diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 4563336a5bc7..3296eff041b0 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -155,26 +155,32 @@ in sshKey = "/root/.ssh/id_buildfarm"; system = "x86_64-linux"; maxJobs = 2; + supportedFeatures = "kvm"; + mandatoryFeatures = "perf"; } ]; description = " This option lists the machines to be used if distributed builds are enabled (see ). Nix will perform - derivations on those machines via SSh by copying the inputs to - the Nix store on the remote machine, starting the build, then - copying the output back to the local Nix store. Each element - of the list should be an attribute set containing the - machine's host name (hostname), the user - name to be used for the SSH connection + derivations on those machines via SSh by copying the inputs + to the Nix store on the remote machine, starting the build, + then copying the output back to the local Nix store. Each + element of the list should be an attribute set containing + the machine's host name (hostname), the + user name to be used for the SSH connection (sshUser), the Nix system type (system, e.g., - \"i686-linux\"), the maximum number of jobs - to be run in parallel on that machine - (maxJobs), and the path to the SSH private - key to be used to connect (sshKey). The - SSH private key should not have a passphrase, and the - corresponding public key should be added to + \"i686-linux\"), the maximum number of + jobs to be run in parallel on that machine + (maxJobs), the path to the SSH private + key to be used to connect (sshKey), a + list of supported features of the machine + (supportedFeatures) and a list of + mandatory features of the machine + (mandatoryFeatures). The SSH private key + should not have a passphrase, and the corresponding public + key should be added to ~sshUser/authorized_keys on the remote machine. "; @@ -263,6 +269,10 @@ in + (if machine ? system then machine.system else concatStringsSep "," machine.systems) + " ${machine.sshKey} ${toString machine.maxJobs} " + (if machine ? speedFactor then toString machine.speedFactor else "1" ) + + " " + + (if machine ? supportedFeatures then concatStringsSep "," machine.supportedFeatures else "" ) + + " " + + (if machine ? mandatoryFeatures then concatStringsSep "," machine.mandatoryFeatures else "" ) + "\n" ) cfg.buildMachines; };