hydra: add nixmsi as builder

This commit is contained in:
chayleaf 2023-10-18 19:34:55 +07:00
parent 5376be449f
commit 0888579272
4 changed files with 21 additions and 8 deletions

View file

@ -319,14 +319,7 @@
nixosImages.phone = nixosConfigurations.phone.config.mobile.outputs.disk-image;
nixosImages.phone-fastboot = nixosConfigurations.phone.config.mobile.outputs.android.android-fastboot-image;
hydraJobs = let
addMeta = x: x // {
meta = (x.meta or {}) // {
timeout = 60 * 60 * 10;
maxSilent = 60 * 60 * 10;
};
};
in builtins.mapAttrs (_: addMeta) {
hydraJobs = {
server.${config.server.system} = nixosConfigurations.server.config.system.build.toplevel;
workstation.${config.nixmsi.system} = nixosConfigurations.nixmsi.config.system.build.toplevel;
router.${config.router-emmc.system} = nixosConfigurations.router-emmc-cross.config.system.build.toplevel;

View file

@ -151,8 +151,13 @@
programs.ccache.enable = true;
services.sshd.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
users.users.hydra-builder = {
uid = 1001;
isNormalUser = true;
};
nix.settings = {
netrc-file = "/secrets/netrc";
trusted-users = [ "hydra-builder" ];
substituters = [
"https://binarycache.pavluk.org"
"https://cache.nixos.org/"

View file

@ -146,6 +146,16 @@ in {
supportedFeatures = [ "kvm" "local" "nixos-test" "benchmark" "big-parallel" ];
systems = [ "builtin" "x86_64-linux" "aarch64-linux" ];
}
{
hostName = cfg.laptopHostname;
maxJobs = 1;
speedFactor = 2;
protocol = "ssh-ng";
systems = [ "x86_64-linux" ];
supportedFeatures = [ "kvm" "nixos-test" "benchmark" "big-parallel" ];
sshKey = "/secrets/hydra-builder-key";
sshUser = "hydra-builder";
}
];
# limit CI CPU usage since I'm running everything else off this server too
systemd.services.nix-daemon.serviceConfig.CPUQuota = "100%";

View file

@ -9,6 +9,11 @@
default = "pavluk.org";
description = "domain name";
};
laptopHostname = mkOption {
type = with types; nullOr str;
default = null;
description = "laptop hostname";
};
keycloakRealm = mkOption {
type = types.str;
default = "master";