diff --git a/justfile b/justfile index 2120c58..0040932 100644 --- a/justfile +++ b/justfile @@ -63,5 +63,5 @@ deploy host remote=host: nixos-rebuild switch --flake .#{{host}} --target-host {{remote}} --sudo --ask-sudo-password # garbage collect old generations -clean: - sudo nix-collect-garbage $(nix eval --raw -f ./nix.nix nix.gc.options) +clean host=`hostname`: + sudo nix-collect-garbage $(nix eval --raw .#nixosConfigurations.{{host}}.config.nix.gc.options) diff --git a/nix.nix b/nix.nix deleted file mode 100644 index c2dff0d..0000000 --- a/nix.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - nix = { - settings = { - experimental-features = [ - "nix-command" - "flakes" - ]; - download-buffer-size = 2 * 1024 * 1024 * 1024; - warn-dirty = false; - substituters = [ - "https://cache.nixos.org" - "https://nix-community.cachix.org?priority=45" - "http://tower:5000?priority=50" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "matej.nix-1:TdbemLVYblvAxqJcwb3mVKmmr3cfzXbMcZHE5ILnZDE=" - ]; - }; - - gc = { - automatic = true; - dates = "monthly"; - options = "--delete-older-than 30d"; - }; - - optimise = { - automatic = true; - dates = [ "monthly" ]; - }; - }; -}