Files
clan-core/clanModules/admin/default.nix
2024-08-26 18:33:47 +02:00

18 lines
394 B
Nix

{ lib, config, ... }:
{
options.clan.admin = {
allowedKeys = lib.mkOption {
default = [ ];
type = lib.types.listOf lib.types.str;
description = "The allowed public keys for ssh access to the admin user";
};
};
imports = [
../sshd
../root-password
];
config = {
users.users.root.openssh.authorizedKeys.keys = config.clan.admin.allowedKeys;
};
}