restructure user management
This commit is contained in:
parent
3a9a7242fc
commit
ddb7df4a4e
16 changed files with 482 additions and 481 deletions
24
modules/users/vinzenz.nix
Normal file
24
modules/users/vinzenz.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
isUserEnabled = builtins.elem "vinzenz" config.my.enabledUsers;
|
||||
in {
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf isUserEnabled {
|
||||
users.users.vinzenz = {
|
||||
isNormalUser = true;
|
||||
name = "vinzenz";
|
||||
description = "Vinzenz Schroeter";
|
||||
home = "/home/vinzenz";
|
||||
extraGroups = ["networkmanager" "wheel" "games"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (isUserEnabled && config.my.modulesCfg.enableHomeManager) {
|
||||
home-manager.users.vinzenz = import ./vinzenz-home.nix;
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue