Set up build farm #3

Merged
nki merged 11 commits from build-farm into master 2024-08-19 14:04:54 +00:00
Showing only changes of commit e9977076f5 - Show all commits

View file

@ -24,6 +24,12 @@ in
type = types.path; type = types.path;
description = "The path to the private SSH key file"; description = "The path to the private SSH key file";
}; };
ipAddrs = mkOption {
type = types.str;
description = "The ip addresses to limit access to";
default = "11.0.0.*";
};
}; };
config = mkIf cfg.enable ( config = mkIf cfg.enable (
@ -47,7 +53,7 @@ in
description = "Nix build farm user"; description = "Nix build farm user";
group = build-user; group = build-user;
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = lib.mapAttrsToList (_: host: ''from="${host.host}" ${host.pubKey}'') otherHosts; openssh.authorizedKeys.keys = lib.mapAttrsToList (_: host: ''from="${cfg.ipAddrs}" ${host.pubKey}'') otherHosts;
}; };
groups.${build-user} = { }; groups.${build-user} = { };
}; };