seras: add riscv builder and zram

This commit is contained in:
emily 2024-10-23 12:50:16 +02:00
parent 1e9b66957b
commit e76c317759
Signed by: emily
GPG key ID: F6F4C66207FCF995
4 changed files with 27 additions and 38 deletions

View file

@ -7,7 +7,7 @@
nix.extraOptions = '' nix.extraOptions = ''
min-free = ${builtins.toString (16384 * 1024 * 1024)} min-free = ${builtins.toString (16384 * 1024 * 1024)}
max-free = ${builtins.toString (32768 * 1024 * 1024)} max-free = ${builtins.toString (32768 * 1024 * 1024)}
max-substitution-jobs = 20 max-substitution-jobs = 30
max-silent-time = 14400 max-silent-time = 14400
''; '';
nix.sshServe = { nix.sshServe = {

View file

@ -43,6 +43,11 @@
}; };
}; };
systemd.services.hydra-evaluator.serviceConfig = {
MemoryHigh = "250G";
MemoryMax = "254G";
};
kyouma.nginx.defaultForbidden = "hydra.kyouma.net"; kyouma.nginx.defaultForbidden = "hydra.kyouma.net";
kyouma.nginx.virtualHosts = { kyouma.nginx.virtualHosts = {
"hydra.kyouma.net".locations."/".proxyPass = "http://localhost:3000"; "hydra.kyouma.net".locations."/".proxyPass = "http://localhost:3000";

View file

@ -1,12 +1,14 @@
{ config, lib, ... }: { { config, lib, ... }: {
nix.buildMachines = [ nix.buildMachines = let
base = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
in [
{ {
hostName = "localhost"; hostName = "localhost";
protocol = null; protocol = null;
maxJobs = 0; maxJobs = 0;
speedFactor = 0; speedFactor = 0;
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; supportedFeatures = base;
} }
{ {
hostName = "integra.kyouma.net"; hostName = "integra.kyouma.net";
@ -14,20 +16,20 @@
maxJobs = 2; maxJobs = 2;
speedFactor = 4; speedFactor = 4;
systems = [ "aarch64-linux" ]; systems = [ "aarch64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; supportedFeatures = base;
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
} }
{ {
hostName = "build-worker-04.nyantec.com"; hostName = "schrodinger.kyouma.net";
sshUser = "nix-ssh"; sshUser = "root";
maxJobs = 4; maxJobs = 2;
speedFactor = 18; speedFactor = 20;
systems = [ "x86_64-linux" "riscv64-linux" ]; systems = [ "riscv64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ]; supportedFeatures = base ++ [ "gccarch-rv64imac" "gccarch-rv64imacfd" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
} }
] ++ lib.forEach [ "01" "02" "03" "05" "06" "07" "08" "09" ] (num: { ] ++ lib.forEach (lib.genList (i: i + 1) 8) (num: {
hostName = "build-worker-${num}"; hostName = "build-worker-0${toString num}";
sshUser = "root"; sshUser = "root";
maxJobs = 2; maxJobs = 2;
speedFactor = 20; speedFactor = 20;
@ -35,6 +37,8 @@
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ]; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}); });
nix.distributedBuilds = true;
nixpkgs.config.allowUnsupportedSystem = true;
nix.gc.options = lib.mkForce "--delete-older-than 90d"; nix.gc.options = lib.mkForce "--delete-older-than 90d";
nix.settings = { nix.settings = {
allowed-uris = [ allowed-uris = [
@ -49,6 +53,7 @@
"build-worker-03.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEGqTY74c5g15DSNPNM2Wdr5jAwS7BFgX1XRnhtGOnJc"; "build-worker-03.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEGqTY74c5g15DSNPNM2Wdr5jAwS7BFgX1XRnhtGOnJc";
"build-worker-04.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICOq+5I+nlAN2lJoOtoXrYEDuZ/TMPMa43pIlablYigK"; "build-worker-04.nyantec.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICOq+5I+nlAN2lJoOtoXrYEDuZ/TMPMa43pIlablYigK";
"integra.kyouma.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBwEQiSfaDrUAwgul4mktusBPcIVxI4pLNDh9DPopVU"; "integra.kyouma.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBwEQiSfaDrUAwgul4mktusBPcIVxI4pLNDh9DPopVU";
"schrodinger.kyouma.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKo7vZ6lS1wx76YsbAdhOsGcc20YMAW52ep8SZ/FCHDp";
"localhost".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPNVavo3YHVsrYwXRVISu7kDoknn+5inFGySn4azlB8P"; "localhost".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPNVavo3YHVsrYwXRVISu7kDoknn+5inFGySn4azlB8P";
"[build-worker-kyoumanet.fly.dev]:2201".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDL2M97UBHg9aUfjDUxzmzg1r0ga0m3/stummBVwuEAB"; "[build-worker-kyoumanet.fly.dev]:2201".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDL2M97UBHg9aUfjDUxzmzg1r0ga0m3/stummBVwuEAB";
"[build-worker-kyoumanet.fly.dev]:2202".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOTwVKL0P0chPM2Gz23rbT94844+w1CGJdCaZdzfjThz"; "[build-worker-kyoumanet.fly.dev]:2202".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOTwVKL0P0chPM2Gz23rbT94844+w1CGJdCaZdzfjThz";
@ -59,31 +64,10 @@
"[build-worker-kyoumanet.fly.dev]:2207".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9z95a6Fn/dB+iNigEYpuJdBnBwCkIZYaKHcFbGP+RY"; "[build-worker-kyoumanet.fly.dev]:2207".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9z95a6Fn/dB+iNigEYpuJdBnBwCkIZYaKHcFbGP+RY";
"[build-worker-kyoumanet.fly.dev]:2208".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAk+FNMhTfAVqk3MfLp4QiG/i5ti53DlpnC0q+sOvU9O"; "[build-worker-kyoumanet.fly.dev]:2208".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAk+FNMhTfAVqk3MfLp4QiG/i5ti53DlpnC0q+sOvU9O";
}; };
extraConfig = '' extraConfig = lib.concatLines (lib.genList (i: ''
Host build-worker-01 Host build-worker-0${toString (i + 1)}
Hostname build-worker-kyoumanet.fly.dev Hostname build-worker-kyoumanet.fly.dev
Port 2201 Port 220${toString (i + 1)}
Host build-worker-02 '') 8);
Hostname build-worker-kyoumanet.fly.dev
Port 2202
Host build-worker-03
Hostname build-worker-kyoumanet.fly.dev
Port 2203
Host build-worker-05
Hostname build-worker-kyoumanet.fly.dev
Port 2204
Host build-worker-06
Hostname build-worker-kyoumanet.fly.dev
Port 2205
Host build-worker-07
Hostname build-worker-kyoumanet.fly.dev
Port 2206
Host build-worker-08
Hostname build-worker-kyoumanet.fly.dev
Port 2207
Host build-worker-09
Hostname build-worker-kyoumanet.fly.dev
Port 2208
'';
}; };
} }

View file

@ -162,7 +162,7 @@ in {
style.package = with pkgs; [ style.package = with pkgs; [
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
qt6Packages.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum
(catppuccin-kvantum.override { accent = "Mauve"; variant = "Macchiato"; }) (catppuccin-kvantum.override { accent = "mauve"; variant = "macchiato"; })
]; ];
}; };
gtk.iconTheme.name = "Adwaita"; gtk.iconTheme.name = "Adwaita";