refactor(nixos/ssh): add authorizedKeys to ssh module & rm from users

This commit is contained in:
Mohammad Rafiq 2025-07-07 18:18:57 +08:00
parent b63959f307
commit bf260096d5
No known key found for this signature in database
2 changed files with 18 additions and 11 deletions

View file

@ -11,8 +11,6 @@ in
#TODO: move sudo/security options elsewhere
# security.sudo.wheelNeedsPassword = false;
# nix.settings.trusted-users = [ "@wheel" ];
#TODO: move ssh key settings elsewhere
# users.users.root.openssh.authorizedKeys.keys = [ owner.pubkey ];
# persist uids and gids
persistDirs = [ "/var/lib/nixos" ];
users = {
@ -23,7 +21,6 @@ in
isNormalUser = true;
hashedPasswordFile = config.sops.secrets."${name}/hashedPassword".path;
extraGroups = optional (value.primary or false) "wheel";
openssh.authorizedKeys.keys = [ value.pubkey ];
}
);
};