2 ms·
Using these with home-manager is also really simple. You simply enable nix-direnv[0], and then `use flake` in your envrc[1]. Finally, set up your flake.nix with
by zamalek 4y ago
Using these with home-manager is also really simple. You simply enable nix-direnv[0], and then `use flake` in your envrc[1]. Finally, set up your flake.nix with a dev shell[2] (I'm definitely going to take a look at numtide's devshell).
You'll also need flakes and the nix command enabled first [3] (add that line to `/etc/nix/nix.conf` if you aren't using nixos).
Why use flakes? Mostly because it has a lockfile: there's a really good chance that "works on my machine" is "works on my team's machines." Flakes are also much cleaner than vanilla Nix.
[0]: https://gitlab.com/jcdickinson/nix/-/blob/main/home/general.nix#L65 https://gitlab.com/jcdickinson/nix/-/blob/main/home/general.... [1]: https://gitlab.com/jcdickinson/nix/-/blob/main/.envrc#L3 https://gitlab.com/jcdickinson/nix/-/blob/main/.envrc#L3 [2]: https://gitlab.com/jcdickinson/nix/-/blob/main/flake.nix#L65 https://gitlab.com/jcdickinson/nix/-/blob/main/flake.nix#L65 [3]: https://gitlab.com/jcdickinson/nix/-/blob/70844981d5cd63c83932f201480ad736c322335c/system/configuration.nix#L26 https://gitlab.com/jcdickinson/nix/-/blob/70844981d5cd63c839...