From 6f9523372d678fe378619e5ac6993df2b6bfe860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Thu, 24 Apr 2025 13:07:44 -0400 Subject: [PATCH] Automate garbage collection with deleting old versions so we don't run out of space again --- configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configuration.nix b/configuration.nix index 56d994e..f17424e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -180,6 +180,13 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + # Garbage collection - via https://discourse.nixos.org/t/no-space-left-on-boot/24019/8 + nix.gc = { + automatic = true; + randomizedDelaySec = "14m"; + options = "--delete-older-than 60d"; + }; + networking.hostName = "nixos"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.