add remote-build as trusted user
All checks were successful
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #23616 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #23614 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra devShells.x86_64-linux.default Hydra build #23613 of nixos-config:pr618:devShells.x86_64-linux.default
Hydra checks.x86_64-linux.containers-default Hydra build #23612 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #23615 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra nixosConfigurations.not522 Hydra build #23617 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #23618 of nixos-config:pr618:nixosConfigurations.not522-installer

This commit is contained in:
Charlotte 🦝 Delenk 2024-11-04 13:37:51 +01:00
parent 8ff5390104
commit 9440ee12f8

View file

@ -5,15 +5,22 @@
}: }:
with lib; { with lib; {
options.hydra.buildServer.enable = mkEnableOption "Make this device a build server"; options.hydra.buildServer.enable = mkEnableOption "Make this device a build server";
config.hydra.buildServer.enable = let imports = [
buildServers = import ./build-server-list.nix; {
in config.hydra.buildServer.enable = let
mkDefault (any (t: t == config.networking.hostName) buildServers); buildServers = import ./build-server-list.nix;
config.users.users.remote-build = mkIf config.hydra.buildServer.enable { in
description = "Remote builder"; mkDefault (any (t: t == config.networking.hostName) buildServers);
isNormalUser = true; }
openssh.authorizedKeys.keys = [ ];
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINN5Q/L2FyB3DIgdJRYnTGHW3naw5VQ9coOdwHYmv0aZ darkkirb@thinkrac" config = mkIf config.hydra.buildServer.enable {
]; users.users.remote-build = {
description = "Remote builder";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINN5Q/L2FyB3DIgdJRYnTGHW3naw5VQ9coOdwHYmv0aZ darkkirb@thinkrac"
];
};
nix.settings.trusted-users = ["remote-build"];
}; };
} }