forked from DGNum/infrastructure
feat(machines/nixos/build01/nix-builder): enable trusted remote building
This enables any nix-builder to be able to remote build with the trusted bit in Nix. This effectively gives root to all these people, I don't think it's a big deal. Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
parent
5ca85e3430
commit
551c75ac47
1 changed files with 12 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
dgn-keys,
|
||||
meta,
|
||||
...
|
||||
}:
|
||||
|
@ -12,6 +13,13 @@
|
|||
config = {
|
||||
dgn-access-control.users = lib.genAttrs meta.organization.groups.nix-builder (u: lib.singleton u);
|
||||
|
||||
# FIXME(Raito): this should really go into `dgn-access-control` but I don't
|
||||
# know what is the desired architecture for it. Leaving it for the people with opinions™.
|
||||
users.groups.nix-builders = { };
|
||||
users.users = lib.genAttrs meta.organization.groups.nix-builder (u: {
|
||||
extraGroups = [ "nix-builders" ];
|
||||
});
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
|
@ -43,6 +51,10 @@
|
|||
nrBuildUsers = 128;
|
||||
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"@wheel"
|
||||
"@nix-builders"
|
||||
];
|
||||
keep-outputs = false;
|
||||
keep-derivations = false;
|
||||
use-cgroups = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue