Automatically git root access to all contributors

This commit is contained in:
Nicolas Jeannerod 2025-01-31 10:59:36 +01:00
parent d92d5f40ae
commit 873a1c9177
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
2 changed files with 8 additions and 9 deletions

View file

@ -30,11 +30,4 @@
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
nix.settings.trusted-users = [ "@wheel" ]; nix.settings.trusted-users = [ "@wheel" ];
## FIXME: Remove direct root authentication once NixOps4 supports users with
## password-less sudo.
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEElREJN0AC7lbp+5X204pQ5r030IbgCllsIxyU3iiKY"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJg5TlS1NGCRZwMjDgBkXeFUXqooqRlM8fJdBAQ4buPg"
];
} }

View file

@ -6,7 +6,7 @@
}: }:
let let
inherit (builtins) mapAttrs; inherit (lib) attrValues mapAttrs;
inherit (lib.attrsets) genAttrs; inherit (lib.attrsets) genAttrs;
makeResource = makeResource =
@ -32,7 +32,13 @@ let
vmmodule vmmodule
./common ./common
self.nixosModules.ageSecrets self.nixosModules.ageSecrets
{ fediversity.hostPublicKey = self.keys.systems.${vmid}; } {
fediversity.hostPublicKey = self.keys.systems.${vmid};
## FIXME: Remove direct root authentication once the NixOps4 NixOS
## provider supports users with password-less sudo.
users.users.root.openssh.authorizedKeys.keys = attrValues self.keys.contributors;
}
]; ];
}; };
}; };