diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index b51aff4..027646c 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -28,16 +28,6 @@ # Install librewolf programs.librewolf.enable = true; - # Install nh - programs.nh = { - enable = true; - flake = "/home/crony/Repos/nixos"; - clean = { - enable = true; - extraArgs = "--keep 5 --keep-since 3d"; - }; - }; - # Install foot programs.foot.enable = true; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 2a56b32..39209ad 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -7,6 +7,7 @@ ./nnn.nix ./mpv.nix ./obs-studio.nix + ./nh.nix ]; crony.mangohud.enable = lib.mkDefault true; @@ -16,4 +17,5 @@ crony.nnn.enable = lib.mkDefault true; crony.mpv.enable = lib.mkDefault true; crony.obs-studio.enable = lib.mkDefault true; + crony.nh.enable = lib.mkDefault true; } diff --git a/modules/home-manager/nh.nix b/modules/home-manager/nh.nix new file mode 100644 index 0000000..a2275dd --- /dev/null +++ b/modules/home-manager/nh.nix @@ -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"; + }; + }; + }; +}