This commit is contained in:
Aleksandr Lebedev 2025-08-11 14:23:54 +02:00
parent a2c4f7385b
commit 764d5dd68c
9 changed files with 4996 additions and 18 deletions

View file

@ -0,0 +1,37 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
username = "andrej";
admin = false;
extraGroups = ["networkmanager"];
trustedSshKeys = [];
cfg = config.${namespace}.users.${username};
in {
options.${namespace}.users.${username} = with types; {
enable = mkBoolOpt false "Enable ${username} user";
config = mkOpt types.attrs {} "Additional home manager config for ${username}";
};
config = mkUser {
inherit config;
inherit (cfg) enable;
homeConfig = cfg.config;
inherit username;
inherit admin;
inherit extraGroups;
inherit trustedSshKeys;
};
}