From 7c309df1ad2d6595d9a57b6dd7ab4de63ee3e3f7 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 21 Feb 2024 11:00:07 +0900 Subject: [PATCH] Add nix optimise automatically --- nixos/common/modules/nixos.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/common/modules/nixos.nix b/nixos/common/modules/nixos.nix index a8de5684..a91fdae2 100644 --- a/nixos/common/modules/nixos.nix +++ b/nixos/common/modules/nixos.nix @@ -2,10 +2,15 @@ # Enable flakes: https://nixos.wiki/wiki/Flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.optimise = { + automatic = true; + dates = "daily"; + }; + # Garbage collection -- Keep the system clean nix.gc = { automatic = true; dates = "daily"; options = "--delete-older-than 7d"; }; -} \ No newline at end of file +}