snowfield/modules/nix/default.nix
2021-12-25 12:53:48 +01:00

32 lines
627 B
Nix

{ pkgs, config, lib, inputs, ... }:
let
cfg = config.luj.nix;
in
with lib;
{
options.luj.nix = {
enable = mkEnableOption "Enable nix experimental";
};
config = mkIf cfg.enable
{
nixpkgs.config.allowUnfree = true;
nix = {
autoOptimiseStore = true;
allowedUsers = [ "julien" "hydra" ];
gc = {
automatic = true;
dates = "daily";
};
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
nixPath = [
"nixpkgs=${inputs.nixpkgs}"
];
};
};
}