From d69984e735872e00aa637eefbb0b2456aca467b3 Mon Sep 17 00:00:00 2001 From: zuma Date: Wed, 5 Nov 2025 11:31:51 +0100 Subject: [PATCH] Added Garbage collection --- configuration.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index ddafa53..d605f9a 100755 --- a/configuration.nix +++ b/configuration.nix @@ -114,13 +114,20 @@ services.openssh.enable = true; services.openssh.settings.PasswordAuthentication = false; - networking.firewall.enable = true; # Open ports in the firewall. + networking.firewall.enable = true; networking.firewall.allowedTCPPorts = [ 1972 # SSH ]; # networking.firewall.allowedUDPPorts = [ ... ]; + # Garbage collection to remove old NixOs iterations + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix.