From 796e1582a3ba0933d8d121e7a87b974cb3c51851 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Mon, 6 Jun 2022 13:24:46 +0100 Subject: [PATCH] nixos/common: Add automatic Nix store GC --- nixos/modules/common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index fdb2af1..fc58eb7 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -52,6 +52,10 @@ in trusted-users = [ "@wheel" ]; experimental-features = [ "nix-command" "flakes" "ca-derivations" ]; }; + gc = { + options = mkDefault "--max-freed $((8 * 1024**3))"; + automatic = mkDefault true; + }; }; nixpkgs = { overlays = [