From 82fc3209deb93a46e0b484eb1096655de1d17a8b Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 22 Apr 2025 16:16:42 +0200 Subject: [PATCH] Set keep-outputs to true in all machines From the documentation of keep-outputs, setting it to true would prevent the GC from removing build time dependencies: If true, the garbage collector will keep the outputs of non-garbage derivations. If false (default), outputs will be deleted unless they are GC roots themselves (or reachable from other roots). In general, outputs must be registered as roots separately. However, even if the output of a derivation is registered as a root, the collector will still delete store paths that are used only at build time (e.g., the C compiler, or source tarballs downloaded from the network). To prevent it from doing so, set this option to true. See: https://nix.dev/manual/nix/2.24/command-ref/conf-file.html#conf-keep-outputs Reviewed-by: Aleix Roca Nonell --- m/common/base/nix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/m/common/base/nix.nix b/m/common/base/nix.nix index dc79647..5eee5b7 100644 --- a/m/common/base/nix.nix +++ b/m/common/base/nix.nix @@ -23,6 +23,7 @@ trusted-users = [ "@wheel" ]; flake-registry = pkgs.writeText "global-registry.json" ''{"flakes":[],"version":2}''; + keep-outputs = true; }; gc = {