Move nix gc+opt to global config

This commit is contained in:
minish 2024-12-14 19:39:24 -05:00
parent d0c233b7e1
commit 134d049a7b
Signed by: min
SSH Key Fingerprint: SHA256:NFjjdbkd6u7aoMlcrDCVvz6o2UBtlAuPm8IQ2vhZ3Fg
2 changed files with 11 additions and 13 deletions

View File

@ -105,18 +105,5 @@ in {
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"]; hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
}; };
# Periodically optimise & collect garbage
nix = {
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = ["daily"];
};
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -29,6 +29,17 @@
### Nix settings ### ### Nix settings ###
nix = { nix = {
# Periodically optimise & collect garbage
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = ["daily"];
};
# Make sure flakes are enabled # Make sure flakes are enabled
settings.experimental-features = ["nix-command" "flakes"]; settings.experimental-features = ["nix-command" "flakes"];
extraOptions = '' extraOptions = ''