Added inputs to gcroots

This commit is contained in:
Julien Malka 2022-02-28 14:29:42 +01:00
parent 0fad8200a3
commit bce831f4fe
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
6 changed files with 19 additions and 48 deletions

View file

@ -8,6 +8,12 @@ with lib;
enable = mkEnableOption "Enable nix experimental";
};
options.nix.gcRoots = mkOption {
description = "A list of garbage collector roots.";
type = with types; listOf path;
default = [];
};
config = mkIf cfg.enable
{
nixpkgs.config.allowUnfree = true;
@ -17,7 +23,7 @@ with lib;
automatic = true;
dates = "weekly";
};
package = pkgs.nixUnstable;
package = pkgs.unstable.nix;
extraOptions = ''
experimental-features = nix-command flakes
narinfo-cache-negative-ttl = 0
@ -33,8 +39,9 @@ with lib;
"bin.julienmalka.me:y0uADfX8ZQ6Pthofm8Pj7v+hED3m2cY0d+Sg6/Jm+s8="
];
gcRoots = [ inputs.neovim-nightly-overlay inputs.nixpkgs inputs.unstable inputs.home-manager ];
};
environment.etc.gc-roots.text = concatMapStrings (x: x + "\n") config.nix.gcRoots;
};
}