global/nix: setup remote build user
This commit is contained in:
parent
43af63273a
commit
910b179e95
1 changed files with 14 additions and 1 deletions
|
@ -6,7 +6,7 @@ with lib;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
allowed-users = [ "*" ];
|
allowed-users = [ "*" ];
|
||||||
trusted-users = [ "root" "@wheel" ];
|
trusted-users = [ "root" "@wheel" "remotebuild" ];
|
||||||
|
|
||||||
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||||
experimental-features = [ "flakes" "nix-command" "impure-derivations" "no-url-literals" "repl-flake" ];
|
experimental-features = [ "flakes" "nix-command" "impure-derivations" "no-url-literals" "repl-flake" ];
|
||||||
|
@ -51,6 +51,11 @@ with lib;
|
||||||
"nixpkgs=${inputs.nixpkgs}"
|
"nixpkgs=${inputs.nixpkgs}"
|
||||||
"home-manager=${inputs.home-manager}"
|
"home-manager=${inputs.home-manager}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
distributedBuilds = true;
|
||||||
|
extraOptions = ''
|
||||||
|
builders-use-substitutes = true
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
|
@ -95,4 +100,12 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users.remotebuild = {
|
||||||
|
description = "Unprivledged user for Nix remote builds";
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||||
|
group = "remotebuild";
|
||||||
|
};
|
||||||
|
users.groups.remotebuild = { };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue