Skip to content

Commit

Permalink
services/hydra: fix builders
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Feb 13, 2024
1 parent eb84767 commit aadc95b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 0 additions & 11 deletions nixos/hosts/hil0/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ in {
services.mastodon
services.maddy
services.well-known
nix.hydra-builder-server
nix.access-tokens
])
++ [
Expand Down Expand Up @@ -122,16 +121,6 @@ in {
};
})

# hydra extra configurations
{
services.hydra.buildMachinesFiles = [
"/etc/nix-build-machines/hydra-builder/machines"
];
# limit cpu usage of nix eval and builds
systemd.services.nix-daemon.serviceConfig.CPUWeight = "idle";
systemd.services.hydra-evaluator.serviceConfig.CPUWeight = "idle";
}

# mastodon extra configurations
{
services.mastodon.streamingProcesses = 3; # number of cpu cores - 1
Expand Down
9 changes: 9 additions & 0 deletions nixos/profiles/services/hydra/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ in {
</runcommand>
'';
};
services.hydra.buildMachinesFiles = [
"/etc/nix-build-machines/hydra-builder/machines"
];
# allow evaluator and queue-runner to access nix-access-tokens
systemd.services.hydra-evaluator.serviceConfig.SupplementaryGroups = [config.users.groups.nix-access-tokens.name];
systemd.services.hydra-queue-runner.serviceConfig.SupplementaryGroups = [
Expand Down Expand Up @@ -123,5 +126,11 @@ in {
restartUnits = ["hydra-notify.service"];
};
}

# decrease cpu weight
{
systemd.services.nix-daemon.serviceConfig.CPUWeight = "idle";
systemd.services.hydra-evaluator.serviceConfig.CPUWeight = "idle";
}
];
}

0 comments on commit aadc95b

Please sign in to comment.