2024-10-30 06:56:03 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-09 14:02:26 +00:00
|
|
|
with lib;
|
|
|
|
{
|
2024-10-30 06:56:03 +00:00
|
|
|
options.hydra.buildServer.enable = mkEnableOption "Make this device a build server";
|
2024-11-04 12:37:51 +00:00
|
|
|
imports = [
|
|
|
|
{
|
2024-11-09 14:02:26 +00:00
|
|
|
config.hydra.buildServer.enable =
|
|
|
|
let
|
|
|
|
buildServers = import ./build-server-list.nix;
|
|
|
|
in
|
2024-11-04 12:37:51 +00:00
|
|
|
mkDefault (any (t: t == config.networking.hostName) buildServers);
|
|
|
|
}
|
|
|
|
];
|
|
|
|
config = mkIf config.hydra.buildServer.enable {
|
|
|
|
users.users.remote-build = {
|
|
|
|
description = "Remote builder";
|
|
|
|
isNormalUser = true;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINN5Q/L2FyB3DIgdJRYnTGHW3naw5VQ9coOdwHYmv0aZ darkkirb@thinkrac"
|
|
|
|
];
|
|
|
|
};
|
2024-11-09 14:02:26 +00:00
|
|
|
nix.settings.trusted-users = [ "remote-build" ];
|
2024-10-30 06:56:03 +00:00
|
|
|
};
|
|
|
|
}
|