From f5183a76052faf039ee1ab226e6cb63b4fccd9ec Mon Sep 17 00:00:00 2001 From: rope Date: Sun, 17 May 2026 22:32:34 +0100 Subject: [PATCH] gaming: set max-jobs = 1 to allow trivial local builds pkgs.writeText derivations (used by HM for config files) carry preferLocalBuild = true, which the remote build hook declines, and allowSubstitutes = false, which prevents cache hits. With max-jobs = 0 these can never be realised, causing nixos-rebuild to fail. Setting max-jobs = 1 lets these millisecond-duration text-file writes run locally with no gaming impact. All real compilation still goes to the media server via the distributed build configuration. Co-Authored-By: Claude Sonnet 4.6 --- hosts/FredOS-Gaming.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hosts/FredOS-Gaming.nix b/hosts/FredOS-Gaming.nix index 83bc24d..d3d307f 100644 --- a/hosts/FredOS-Gaming.nix +++ b/hosts/FredOS-Gaming.nix @@ -19,11 +19,17 @@ woeusb ]; - # Force all builds off the gaming PC onto the media server so nix updates + # Force heavy builds off the gaming PC onto the media server so nix updates # never compete with games for CPU/RAM. Pairs with the distributed build # config in common.nix. builders-use-substitutes lets the server pull from # binary caches directly rather than re-uploading through this machine. - nix.settings.max-jobs = 0; + # + # max-jobs = 1 (not 0): trivial preferLocalBuild = true derivations (e.g. + # pkgs.writeText for HM config files) are rejected by the remote build hook + # and can't be substituted, so they must build locally. They finish in + # milliseconds and have no gaming impact. All real compilation still goes to + # the remote via the distributed build config. + nix.settings.max-jobs = 1; nix.settings.builders-use-substitutes = true; programs.nix-ld.enable = true;