fix authorized keys

This commit is contained in:
Kiara Grouwstra 2025-04-22 19:19:22 +02:00
parent 41648d6e8d
commit 4bd2cc3eb8
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
3 changed files with 7 additions and 3 deletions

View file

@ -5,7 +5,7 @@
}:
let
inherit (lib) elem mkDefault;
inherit (lib) attrValues elem mkDefault;
inherit (lib.attrsets) concatMapAttrs optionalAttrs;
inherit (lib.strings) removeSuffix;
@ -34,4 +34,8 @@ in
${removeSuffix ".age" name}.file = secretsPrefix + "/${name}";
}
) secrets;
## FIXME: Remove direct root authentication once the NixOps4 NixOS provider
## supports users with password-less sudo.
users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors;
}

View file

@ -14,7 +14,7 @@ module "nixos" {
# wiki = "vm02187" # does not resolve
# forgejo = "vm02116" # does not resolve
# TODO: move these to a separate `host` dir
# dns = "fedi200" # does not accept root user
dns = "fedi200"
fedipanel = "fedi201"
} : name => {
hostname = inst

View file

@ -64,7 +64,7 @@ module "nixos" {
## FIXME: switch root authentication to users with password-less sudo, see #24
users.users.root.openssh.authorizedKeys.keys = let
keys = import ../../keys;
in builtins.attrValues keys.contributors ++ [
in [
# allow our panel vm access to the test machines
keys.panel
];