diff --git a/services/hydra/default.nix b/services/hydra/default.nix index 9240d76..685bc98 100644 --- a/services/hydra/default.nix +++ b/services/hydra/default.nix @@ -13,15 +13,15 @@ let # XXX: to support Nix's dumb public host key syntax (base64'd), this outputs # a string with shell-style command interpolations: $(...). - mkBaremetalBuilder = { nrCores, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }: - "ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString nrCores} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)"; + mkBaremetalBuilder = { parallelBuilds, publicHostKey, host, speedFactor ? 1, user ? "builder", supportedSystems ? [ "i686-linux" "x86_64-linux" ], supportedFeatures ? [ "big-parallel" "kvm" "nixos-test" ] }: + "ssh://${user}@${host} ${lib.concatStringsSep "," supportedSystems} ${config.age.secrets.hydra-ssh-key-priv.path} ${toString parallelBuilds} ${toString speedFactor} ${lib.concatStringsSep "," supportedFeatures} - $(echo -n '${publicHostKey}' | base64 -w0)"; # TODO: # - generalize to new architectures # - generalize to new features baremetalBuilders = lib.concatStringsSep "\n" (map (n: mkBaremetalBuilder { - nrCores = 40; # TODO: do not hardcode this, use the node's builder configuration. + parallelBuilds = 8; # TODO: do not hardcode this, use the node's builder configuration. publicHostKey = ssh-keys.machines.${n}; host = nodes.${n}.config.networking.fqdn; }) cfg.builders);