home: add user descriptions

This commit is contained in:
514fpv 2024-01-03 11:40:30 +08:00
parent 657c50c44d
commit 3a674d95d7
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 18 additions and 2 deletions

View file

@ -13,6 +13,11 @@ in {
default = null;
description = "uid passthrough to base user configuration";
};
description = mkOption {
type = with types; nullOr str;
default = null;
description = "description passthrough to base user configuration";
};
admin = mkOption {
type = with types; bool;
default = false;
@ -61,6 +66,7 @@ in {
users = {
users = mapAttrs (name: opts: {
inherit (opts) uid;
description = with opts; mkIf (description != null) description;
extraGroups = mkIf opts.admin cfg.adminGroups;
openssh.authorizedKeys.keys = mkIf (opts.sshLogin && config.services.openssh.enable)
config.faucet.auth.openssh.publicKeys;