hydra: fix increase parallel builds, increase max output, cleanup

This commit is contained in:
Sandro - 2022-09-21 21:31:30 +02:00
parent 97e18154b1
commit 93fc2736bb
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 18 additions and 22 deletions

View File

@ -22,14 +22,13 @@
programs.mosh.enable = true;
nix = {
useSandbox = false;
maxJobs = 8;
buildCores = 20;
autoOptimiseStore = true;
sshServe.enable = true;
trustedUsers = [ "@wheel" ];
settings = {
auto-optimise-store = true;
cores = 20;
keep-outputs = true;
max-jobs = 8;
};
};

View File

@ -14,6 +14,11 @@
nix = {
settings = {
allowed-uris = "https://gitea.c3d2.de/ https://github.com/ https://gitlab.com/ ssh://gitea@gitea.c3d2.de/";
builders-use-substitutes = true;
experimental-features = "ca-derivations nix-command flakes";
extra-substituters = "https://cache.ngi0.nixos.org/";
extra-trusted-public-keys = "cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=";
substituters = [
"https://cache.ngi0.nixos.org/"
];
@ -21,13 +26,6 @@
"cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="
];
};
extraOptions = ''
allowed-uris = https://gitea.c3d2.de/ https://github.com/ https://gitlab.com/ ssh://gitea@gitea.c3d2.de/
builders-use-substitutes = true
experimental-features = ca-derivations nix-command flakes
extra-substituters = https://cache.ngi0.nixos.org/
extra-trusted-public-keys = cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=
'';
};
nixpkgs = {
@ -57,12 +55,6 @@
};
nix = {
extraOptions = lib.mkForce ''
allowed-uris = http:// https:// ssh://
builders-use-substitutes = true
experimental-features = ca-derivations nix-command flakes
'';
trustedUsers = [ "hydra" "root" ];
buildMachines = [{
hostName = "client@dacbert.hq.c3d2.de";
system = lib.concatStringsSep "," [
@ -71,10 +63,15 @@
supportedFeatures = [ "kvm" "nixos-test" ];
maxJobs = 1;
}];
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
daemonIOSchedPriority = 7;
settings = {
allowed-uris = "http:// https:// ssh://";
builders-use-substitutes = true;
experimental-features = "ca-derivations nix-command flakes";
};
trustedUsers = [ "hydra" "root" ];
};
services = {
@ -86,8 +83,8 @@
];
hydraURL = "https://hydra.hq.c3d2.de";
logo = ./c3d2.svg;
minimumDiskFree = 1;
minimumDiskFreeEvaluator = 1;
minimumDiskFree = 50;
minimumDiskFreeEvaluator = 50;
notificationSender = "hydra@spam.works";
useSubstitutes = true;
extraConfig =
@ -98,7 +95,7 @@
binary_cache_secret_key_file = ${key}
evaluator_workers = 4
evaluator_max_memory_size = 2048
max_output_size = ${toString (4*1024*1024*1024)} # sd card and raw images
max_output_size = ${toString (5*1024*1024*1024)} # sd card and raw images
store_uri = auto?secret-key=${key}&write-nar-listing=1&ls-compression=zstd&log-compression=zstd
upload_logs_to_binary_cache = true
'';
@ -147,7 +144,7 @@
++ lib.filter (e: e != "aarch64-linux" && !(lib.hasPrefix "armv" e)) config.nix.settings.extra-platforms;
in ''
cat << EOF > ~/machines
localhost ${lib.concatStringsSep "," platforms} - 4 5 - -
localhost ${lib.concatStringsSep "," platforms} - ${toString config.nix.settings.max-jobs} 10 ${lib.concatStringsSep "," config.nix.settings.system-features} -
EOF
'';