add nix-direnv

This commit is contained in:
Sridhar Ratnakumar 2021-12-11 18:03:28 -05:00
parent 7680fa9e33
commit 9486654c4a
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
# https://github.com/nix-community/nix-direnv
environment.systemPackages = with pkgs; [ direnv nix-direnv ];
# nix options for derivations to persist garbage collection
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
environment.pathsToLink = [
"/share/nix-direnv"
];
nixpkgs.overlays = [
(self: super: { nix-direnv = super.nix-direnv.override { enableFlakes = true; }; })
];
}

View file

@ -48,6 +48,7 @@
./features/caches
./features/current-location.nix
./features/passwordstore.nix
./features/dev/nix-direnv.nix
# home-manager configuration
home-manager.nixosModules.home-manager