From a876166b4e5cf20af0d14c6ea41fa0e2d6e70b44 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 4 Mar 2024 00:21:42 +0300 Subject: [PATCH] Nix : Use min-free instead of gc. --- .config/linux/system/module/common/Nix.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.config/linux/system/module/common/Nix.nix b/.config/linux/system/module/common/Nix.nix index 6011a38..1701ffd 100644 --- a/.config/linux/system/module/common/Nix.nix +++ b/.config/linux/system/module/common/Nix.nix @@ -1,16 +1,18 @@ { environment, ... }: { environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; + nixpkgs.config.allowUnfree = true; + nix.settings.auto-optimise-store = true; nix.extraOptions = '' experimental-features = nix-command flakes keep-derivations = true keep-outputs = true + min-free = ${toString (10 * 1024 * 1024 * 1024)} ''; - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; - persistent = true; - }; - nix.settings.auto-optimise-store = true; - nixpkgs.config.allowUnfree = true; + # max-free = ${toString (10 * 1024 * 1024 * 1024)} + # nix.gc = { + # automatic = true; + # dates = "weekly"; + # options = "--delete-older-than 30d"; + # persistent = true; + # }; }