hydra: switch to buildMachinesFiles ()

This commit is contained in:
zowoq 2022-10-30 06:38:47 +10:00 committed by GitHub
parent 59a315e437
commit 7efcb78dff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 14 deletions
services/hydra
tasks.py

View file

@ -70,6 +70,14 @@ in {
services.hydra = {
enable = true;
# remote builders set in /etc/nix/machines + localhost
buildMachinesFiles = [
"/etc/nix/machines"
(pkgs.writeText "local" ''
localhost x86_64-linux,builtin - 8 1 nixos-test,big-parallel,kvm - -
'')
];
hydraURL = "https://hydra.nix-community.org";
notificationSender = "hydra@hydra.nix-community.org";
port = hydraPort;
@ -81,18 +89,6 @@ in {
'';
};
nix = {
distributedBuilds = true;
buildMachines = [
{
hostName = "localhost";
systems = ["x86_64-linux" "builtin"];
maxJobs = 8;
supportedFeatures = ["nixos-test" "big-parallel" "kvm"];
}
];
};
services.postgresql = {
enable = true;
ensureDatabases = ["hydra"];

View file

@ -23,8 +23,7 @@ def deploy_nixos(hosts: List[DeployHost]) -> None:
f"rsync {' --exclude '.join([''] + RSYNC_EXCLUDES)} -vaF --delete -e ssh . {target}:/etc/nixos"
)
# FIXME: build03 has itself as a builder and deadlocks building packages.
h.run(f"nixos-rebuild switch --builders '' --option accept-flake-config true")
h.run(f"nixos-rebuild switch --option accept-flake-config true")
g.run_function(deploy)