diff options
| author | Steffen Vogel <post@steffenvogel.de> | 2024-02-18 13:25:01 +0100 |
|---|---|---|
| committer | Steffen Vogel <post@steffenvogel.de> | 2024-02-18 13:25:01 +0100 |
| commit | 94558e7e8b3acb1ac8fe2b65042b49b488fe0678 (patch) | |
| tree | e881acf0dc691872030f1570165f6ef573c399fe /modules/nix/linux-builder.nix | |
| parent | 0e6857fa1d632637488666c08e7b02c08e3178f8 (diff) | |
linux-builder: Pass through more options to nix.buildMachines
This commit passes more options to nix.buildMachines. Namely the mandatoryFeatures and speedFactor settings have been missing.
Diffstat (limited to 'modules/nix/linux-builder.nix')
| -rw-r--r-- | modules/nix/linux-builder.nix | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/modules/nix/linux-builder.nix b/modules/nix/linux-builder.nix index d487800..b71ae56 100644 --- a/modules/nix/linux-builder.nix +++ b/modules/nix/linux-builder.nix @@ -65,17 +65,49 @@ in default = 1; example = 4; description = lib.mdDoc '' - This option specifies the maximum number of jobs to run on the Linux builder at once. + 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 + machines. This sets the corresponding `nix.buildMachines.*.maxJobs` option. ''; }; + speedFactor = mkOption { + type = types.ints.positive; + default = 1; + description = lib.mdDoc '' + The relative speed of the Linux builder. This is an arbitrary integer + that indicates the speed of this builder, relative to other + builders. Higher is faster. + + This sets the corresponding `nix.buildMachines.*.speedFactor` option. + ''; + }; + + mandatoryFeatures = mkOption { + type = types.listOf types.str; + default = []; + example = [ "big-parallel" ]; + description = lib.mdDoc '' + A list of features mandatory for the Linux builder. The builder will + be ignored for derivations that don't require all features in + this list. All mandatory features are automatically included in + {var}`supportedFeatures`. + + This sets the corresponding `nix.buildMachines.*.mandatoryFeatures` option. + ''; + }; + supportedFeatures = mkOption { type = types.listOf types.str; default = [ "kvm" "benchmark" "big-parallel" ]; + example = [ "kvm" "big-parallel" ]; description = lib.mdDoc '' - This option specifies the list of features supported by the Linux builder. + A list of features supported by the Linux builder. The builder will + be ignored for derivations that require features not in this + list. This sets the corresponding `nix.buildMachines.*.supportedFeatures` option. ''; @@ -141,7 +173,7 @@ in sshKey = "/etc/nix/builder_ed25519"; system = "${stdenv.hostPlatform.uname.processor}-linux"; publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo="; - inherit (cfg) maxJobs supportedFeatures; + inherit (cfg) maxJobs speedFactor mandatoryFeatures supportedFeatures; }]; nix.settings.builders-use-substitutes = true; |
