update mainUser concept
This commit is contained in:
parent
3cd5ab2f65
commit
6d78ee1a97
3 changed files with 22 additions and 3 deletions
|
@ -57,7 +57,6 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
users = {
|
||||
|
||||
mutableUsers = true;
|
||||
|
@ -79,5 +78,21 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
home-manager.users.mainUser.home.file.".mainUser" = {
|
||||
enable = true;
|
||||
text = builtins.toJSON (
|
||||
{
|
||||
mainUser = config.users.users.mainUser.name;
|
||||
normalUser = mapAttrs (_: value: value.name)
|
||||
(filterAttrs (_: value: value.isNormalUser)
|
||||
config.users.users);
|
||||
systemUser = mapAttrs (_: value: value.name)
|
||||
(filterAttrs (_: value: value.isSystemUser)
|
||||
config.users.users);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -253,7 +253,8 @@ in
|
|||
createHome = true;
|
||||
initialPassword = "${name}-browser";
|
||||
shell = pkgs.bashInteractive;
|
||||
isNormalUser = true;
|
||||
isNormalUser = false;
|
||||
isSystemUser = true;
|
||||
group = "users";
|
||||
# enable video usage
|
||||
extraGroups = [ "audio" "pipewire" ] ++ (if config.gpu then [ "video" ] else [ ]);
|
||||
|
|
|
@ -29,11 +29,14 @@ in
|
|||
];
|
||||
|
||||
users.users.steam = {
|
||||
isNormalUser = true;
|
||||
isNormalUser = false;
|
||||
isSystemUser = true;
|
||||
home = "/home/steam";
|
||||
createHome = true;
|
||||
extraGroups = [ "audio" "input" "video" "pipewire" ];
|
||||
group = "steam";
|
||||
};
|
||||
users.groups.steam = { };
|
||||
|
||||
# for steam
|
||||
# ---------
|
||||
|
|
Loading…
Reference in a new issue