diff options
| author | Michael Hoang <enzime@users.noreply.github.com> | 2024-11-28 14:14:25 +1100 |
|---|---|---|
| committer | Michael Hoang <enzime@users.noreply.github.com> | 2024-11-28 14:16:47 +1100 |
| commit | 70957ab0c6a37fe72d21e1a2c273189a05c3670c (patch) | |
| tree | 1a4a1457a676c6f2da47b59d27ca41774230c8c1 /modules/nix | |
| parent | 6ab87b7c84d4ee873e937108c4ff80c015a40c7a (diff) | |
linux-builder: default `maxJobs` to amount of cores for Linux builder
Diffstat (limited to 'modules/nix')
| -rw-r--r-- | modules/nix/linux-builder.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/nix/linux-builder.nix b/modules/nix/linux-builder.nix index 2bcb62e..ae39547 100644 --- a/modules/nix/linux-builder.nix +++ b/modules/nix/linux-builder.nix @@ -61,9 +61,16 @@ in maxJobs = mkOption { type = types.ints.positive; - default = 1; - example = 4; + default = cfg.package.nixosConfig.virtualisation.cores; + defaultText = '' + The `virtualisation.cores` of the build machine's final NixOS configuration. + ''; + example = 2; description = '' + Instead of setting this directly, you should set + {option}`nix.linux-builder.config.virtualisation.cores` to configure + the amount of cores the Linux builder should have. + The number of concurrent jobs the Linux builder machine supports. The build machine will enforce its own limits, but this allows hydra to schedule better since there is no work-stealing between build |
