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 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-17 22:32:34 +01:00
parent f4b45c8bda
commit f5183a7605

View file

@ -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;