modules/shell: nix add nh cli

This commit is contained in:
Sakooooo 2024-08-08 20:59:49 +04:00
parent 008db1b132
commit d3970e07d3
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 19 additions and 0 deletions

View file

@ -3,5 +3,6 @@
./search.nix
./optimization.nix
./switch-to-configuration-ng.nix
./nh.nix
];
}

18
modules/shell/nix/nh.nix Normal file
View file

@ -0,0 +1,18 @@
{ inputs, options, config, lib, pkgs, ...}:
# funny nix cli
let cfg = config.modules.shell.nix.nh;
in
{
options.modules.shell.nix.nh = {
enable = lib.mkEnableOption false;
};
config = lib.mkIf cfg.enable {
programs.nh = {
enable = true;
# TODO try this later
# clean.enable = true;
# clean.extraArgs = "--keep-since 4d --keep 3";
};
};
}