From e781c364dc3ee8f69c2a06082247553c1b484ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Santiago?= <52899490+Alexuty07@users.noreply.github.com> Date: Mon, 18 Mar 2024 07:17:49 +0000 Subject: [PATCH] Enable weekly automatic garbage collection --- configuration.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index adf844d..ad90e92 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,12 +15,22 @@ boot.loader.grub.device = "/dev/vda"; boot.loader.grub.useOSProber = true; - # Enable autoupgrade + # Autoupgrade system.autoUpgrade = { enable = true; channel = "https://nixos.org/channels/nixos-unstable"; }; + # Garbage collection + nix = { + settings.auto-optimise-store = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; + networking.hostName = "nixos"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.