Inventory/modules: use explicit roles only

This commit is contained in:
Johannes Kirschbauer
2024-10-01 15:42:13 +02:00
parent 59889944b3
commit 0819562a0b
17 changed files with 468 additions and 480 deletions

View File

@@ -1,20 +1,6 @@
{ lib, config, ... }:
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
options.clan.admin = {
allowedKeys = lib.mkOption {
default = { };
type = lib.types.attrsOf lib.types.str;
description = "The allowed public keys for ssh access to the admin user";
example = {
"key_1" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...";
};
};
};
imports = [
../sshd
../root-password
];
config = {
users.users.root.openssh.authorizedKeys.keys = builtins.attrValues config.clan.admin.allowedKeys;
};
imports = [ ./roles/default.nix ];
}