diff --git a/configuration.nix b/configuration.nix index f46f128..e49b0f6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -106,7 +106,7 @@ nix.settings.auto-optimise-store = true; system.autoUpgrade.enable = false; nix.gc = { - automatic = true; + automatic = false; dates = "weekly"; options = "--delete-older-than 10d"; }; @@ -226,6 +226,12 @@ ]; }; + programs.nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 10d --keep 5"; + flake = "/home/insert/Documents/nixos"; + }; services.rpcbind.enable = true; # needed for NFS systemd.mounts = [{ diff --git a/home.nix b/home.nix index 7df44c2..5059982 100644 --- a/home.nix +++ b/home.nix @@ -170,9 +170,9 @@ programs.zsh = { enable = true; shellAliases = { - update = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure --upgrade --option commit-lockfile-summary 'Update flake.lock' --commit-lock-file"; - update-locked = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure"; - update-boot = "sudo nixos-rebuild boot --flake /home/insert/Documents/nixos# -v --impure"; + update = "nh os switch -a /home/insert/Documents/nixos -- --impure --option commit-lockfile-summary 'Update flake.lock' --commit-lock-file"; + update-locked = "nh os switch -a /home/insert/Documents/nixos -- --impure"; + update-boot = "nh os boot -a /home/insert/Documents/nixos -- --impure"; garbage = "nix-collect-garbage"; }; initExtra = ''