summaryrefslogtreecommitdiff
path: root/modules/nix
diff options
context:
space:
mode:
authorAlexis Destrez <alexis.destrez@pm.me>2023-10-18 17:47:27 +0200
committerAlexis Destrez <alexis.destrez@pm.me>2023-10-18 17:47:27 +0200
commite621b5aea75810e7228a9ebc93f82b8b41008e7e (patch)
tree9fb9cd6ec0ecd596e685ba25109b31daee2871b4 /modules/nix
parent8b6ea26d5d2e8359d06278364f41fbc4b903b28a (diff)
Provide 'supportedFeatures' option to the linux builder module
Diffstat (limited to 'modules/nix')
-rw-r--r--modules/nix/linux-builder.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/nix/linux-builder.nix b/modules/nix/linux-builder.nix
index 0d473d3..0111aae 100644
--- a/modules/nix/linux-builder.nix
+++ b/modules/nix/linux-builder.nix
@@ -53,6 +53,16 @@ in
This sets the corresponding `nix.buildMachines.*.maxJobs` option.
'';
};
+
+ supportedFeatures = mkOption {
+ type = types.listOf types.str;
+ default = [ "kvm" "benchmark" "big-parallel" ];
+ description = lib.mdDoc ''
+ This option specifies the list of features supported by the Linux builder.
+
+ This sets the corresponding `nix.buildMachines.*.supportedFeatures` option.
+ '';
+ };
};
config = mkIf cfg.enable {
@@ -97,9 +107,8 @@ in
sshUser = "builder";
sshKey = "/etc/nix/builder_ed25519";
system = "${stdenv.hostPlatform.uname.processor}-linux";
- supportedFeatures = [ "kvm" "benchmark" "big-parallel" ];
publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo=";
- inherit (cfg) maxJobs;
+ inherit (cfg) maxJobs supportedFeatures;
}];
nix.settings.builders-use-substitutes = true;