mkDeploy
This commit is contained in:
parent
a2c4f7385b
commit
764d5dd68c
9 changed files with 4996 additions and 18 deletions
37
modules/nixos/users/andrej/default.nix
Normal file
37
modules/nixos/users/andrej/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue