Compare commits

..

3 commits

2 changed files with 51 additions and 5 deletions

View file

@ -11,8 +11,10 @@ let
lib.mapAttrsToList (k: v: "${k}=${v}") settings
);
# 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} - ${publicHostKey}";
"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)";
# TODO:
# - generalize to new architectures
@ -57,7 +59,7 @@ in {
# XXX: Otherwise services.hydra-dev overwrites it to only hydra-queue-runner...
#
# Can be removed once this is added to some common config template.
nix.settings.trusted-users = [ "root" "@wheel" ];
nix.settings.trusted-users = [ "root" "hydra" "@wheel" ];
services.hydra-dev = {
enable = true;
@ -76,7 +78,11 @@ in {
package = pkgs.hydra;
buildMachinesFiles = [
(pkgs.writeText "hydra-builders.conf" baremetalBuilders)
(pkgs.runCommandNoCC "hydra-builders.conf" {} ''
cat >$out <<EOF
${baremetalBuilders}
EOF
'')
];
extraConfig = ''

View file

@ -71,5 +71,45 @@ in
}
];
};
resource.hydra_jobset.delroth-nixpkgs-staging-small = {
project = config.resource.hydra_project.forkos.name;
state = "enabled";
visible = true;
name = "delroth-nixpkgs-staging-small";
type = "legacy";
description = "small eval of nixpkgs staging for testing";
nix_expression = {
file = "pkgs/top-level/release-small.nix";
input = "nixpkgs";
};
check_interval = 0;
scheduling_shares = 3000;
keep_evaluations = 3;
email_notifications = false;
input = [
{
name = "nixpkgs";
type = "git";
value = "https://github.com/nixos/nixpkgs staging";
notify_committers = false;
}
{
name = "officialRelease";
type = "boolean";
value = "false";
notify_committers = false;
}
{
name = "supportedSystems";
type = "nix";
value = ''[ "x86_64-linux" ]'';
}
];
};
};
}