Skip to content

cab404/nixdirenv

Repository files navigation

Nix|Direnv

reproducible environments to the moon!

This project is aimed to popularize and make it easier to use reproducible Nix environments, preferably with direnv.

It provides (todo) manuals to link to and clickbait-y shields, so you can guide potential new maintainers through setting up Nix and Direnv more quickly.

shield
shield-long

There's a short installation guide I've started writing below, but it's WIP.

Ideally there would be an interactive installation script, supporting WSL, MacOS and Linux (todo)


Development

This project uses direnv and Nix to manage environment.

Nix

Nix is a clean package manager.
It allows managing system dependencies like compilers and shared libraries in a portable way, without cluttering or breaking your existing system.

You can install Nix on Linux/MacOS/WSL with the following command

sh <(curl -L https://nixos.org/nix/install) --daemon

Direnv

Direnv is an environment manager.
It runs scripts and loads environment variables from .envrc as you switch between folders.
We prefer nix-direnv implementation, as it works faster with Nix.

You can install it with the following command

nix-env -f '<nixpkgs>' -i nix-direnv

If you use bash, zsh or tcsh, append the following to your ~/.profile

eval "$(direnv hook $(basename $0))"

About

One env setup guide to rule them all.

Topics

Resources

Stars

Watchers

Forks