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