mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
29 lines
656 B
Nix
29 lines
656 B
Nix
# manages remote builds
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.services.remote-build;
|
|
in
|
|
{
|
|
options.my.services.remote-build = {
|
|
enable = lib.mkEnableOption "remote-build user";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# Create user for distributed nix builds
|
|
users.groups.nixremote = { };
|
|
users.users.nixremote = {
|
|
isSystemUser = true;
|
|
group = "nixremote";
|
|
shell = pkgs.bashInteractive;
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYSzDdxqaNHmaaLqEvOK/vB65zvqoCebI3Nxzgg5smq root@thinkman"
|
|
];
|
|
};
|
|
nix.settings.trusted-users = [ "nixremote" ];
|
|
};
|
|
}
|