diff --git a/hosts/hydra/default.nix b/hosts/hydra/default.nix index 743530ae..d29ab21b 100644 --- a/hosts/hydra/default.nix +++ b/hosts/hydra/default.nix @@ -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; }; }; diff --git a/hosts/hydra/hydra.nix b/hosts/hydra/hydra.nix index 1f75a8a2..6cfbf9dd 100644 --- a/hosts/hydra/hydra.nix +++ b/hosts/hydra/hydra.nix @@ -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 '';