From 8f2633c115edacca7dccb46bbe40f8afd065dc1e Mon Sep 17 00:00:00 2001 From: Armel van Ravels Date: Sat, 31 Jan 2026 12:07:33 +0100 Subject: [PATCH] Add garabage collection --- systems/gandalf/default.nix | 1 + systems/modules/garbage-collection.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 systems/modules/garbage-collection.nix diff --git a/systems/gandalf/default.nix b/systems/gandalf/default.nix index a2ca88e..0a22ca6 100644 --- a/systems/gandalf/default.nix +++ b/systems/gandalf/default.nix @@ -11,6 +11,7 @@ ../modules/programs.nix ../modules/gaming.nix ../modules/obs-studio.nix + ../modules/garbage-collection.nix ]; boot.loader.systemd-boot.enable = true; diff --git a/systems/modules/garbage-collection.nix b/systems/modules/garbage-collection.nix new file mode 100644 index 0000000..45db5f7 --- /dev/null +++ b/systems/modules/garbage-collection.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: + +{ + nix = { + settings.auto-optimise-store = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; +}