From 581a63a196db415b3d048aa69a4c7b0057fb3c05 Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Mon, 30 Jun 2025 20:29:22 +0200 Subject: [PATCH] optimise nix store --- modules/common.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/common.nix b/modules/common.nix index 0e1b4cf..c0997b6 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -161,8 +161,16 @@ # Allow installation of proprietary/unfree software nixpkgs.config.allowUnfree = true; - # Enable modern Nix features (flakes and new CLI) - nix.settings.experimental-features = ["nix-command" "flakes"]; + nix = { + settings.experimental-features = ["nix-command" "flakes"]; # Enable modern Nix features (flakes and new CLI) + + optimise = { + # Optimise the Nix store automatically to recover space + automatic = true; + dates = ["03:45"]; # Optional; allows customizing optimisation schedule + persistent = true; # Run missed optimisations + }; + }; # ================================ # AUTOMATIC MAINTENANCE