Move nh config to a module.

This commit is contained in:
CronyAkatsuki 2025-02-01 22:57:04 +01:00
parent 681eb44624
commit 084983e1e1
3 changed files with 23 additions and 10 deletions

View file

@ -0,0 +1,21 @@
{
config,
lib,
...
}: {
options = {
crony.nh.enable = lib.mkEnableOption "Enable nh and set it up for automatic cleaning.";
};
config = lib.mkIf config.crony.nh.enable {
# Install nh
programs.nh = {
enable = true;
flake = "/home/crony/Repos/nixos";
clean = {
enable = true;
extraArgs = "--keep 5 --keep-since 3d";
};
};
};
}