add back old module for compatibility

This commit is contained in:
pinpox
2025-05-14 15:21:11 +02:00
parent 030519413d
commit 857950d373
4 changed files with 38 additions and 11 deletions

View File

@@ -0,0 +1,5 @@
---
description = "Convenient Administration for the Clan App"
categories = ["Utility"]
features = [ "inventory", "deprecated" ]
---

View File

@@ -1,12 +1,3 @@
{ config, ... }:
{ {
config.assertions = [ imports = [ ./roles/default.nix ];
{
assertion = config.clan.inventory.services.admin != { };
message = ''
The admin module has been migrated from `clan.services` to `clan.instances`
See https://docs.clan.lol/TODO for updated usage.
'';
}
];
} }

View File

@@ -0,0 +1,31 @@
{ lib, config, ... }:
{
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...";
};
};
};
# Bad practice.
# Should we add 'clanModules' to specialArgs?
imports = [
../../sshd
../../root-password
];
config = {
warnings = [
''
The admin module has been migrated from `clan.services` to `clan.instances`
See https://docs.clan.lol/manual/distributed-services for usage.
''
];
users.users.root.openssh.authorizedKeys.keys = builtins.attrValues config.clan.admin.allowedKeys;
};
}

View File

@@ -90,7 +90,7 @@ nav:
- reference/clanModules/index.md - reference/clanModules/index.md
- reference/clanModules/frontmatter/index.md - reference/clanModules/frontmatter/index.md
# TODO: display the docs of the clan.service modules # TODO: display the docs of the clan.service modules
# - reference/clanServices/admin.md - reference/clanModules/admin.md
# This is the module overview and should stay at the top # This is the module overview and should stay at the top
- reference/clanModules/borgbackup-static.md - reference/clanModules/borgbackup-static.md
- reference/clanModules/data-mesher.md - reference/clanModules/data-mesher.md