diff --git a/nixos.nix b/nixos.nix index 9c18a15..c853b2f 100644 --- a/nixos.nix +++ b/nixos.nix @@ -24,11 +24,15 @@ "flakes" ]; - # Enable automatic garbage collection. - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; + # Enable nh, a bundle of CLI utilities for NixOS + programs.nh = { + enable = true; + + # Enable automatic garbage collection. + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + + flake = "/home/wizardlink/.system"; }; # Optimize storage diff --git a/switch b/switch deleted file mode 100755 index dc20a6f..0000000 --- a/switch +++ /dev/null @@ -1,12 +0,0 @@ -#!/etc/profiles/per-user/wizardlink/bin/fish - -function build - sudo nixos-rebuild switch --flake ~/.system\#nixos $argv[1] -end - -if test "--fast" = "$argv[1]" - build --fast -else - build -end -