From 0a94178be739e2ddb0c565f849c4bb77c18f0d20 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Thu, 29 Feb 2024 21:45:20 +0500 Subject: [PATCH] feat: enable garbage collection & store optimisation --- nixos/configuration.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index f0aa4ab..cf4d35f 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -31,8 +31,20 @@ ./programs/yggdrasil.nix ]; - # Enable flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + # Enable flakes + settings.experimental-features = [ "nix-command" "flakes" ]; + # Garbage collection + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + optimise = { + automatic = true; + dates = [ "03:00" ]; + }; + }; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true;