update mainUser concept

This commit is contained in:
Ingolf Wagner 2023-07-02 20:56:42 +02:00
parent 3cd5ab2f65
commit 6d78ee1a97
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 22 additions and 3 deletions

View file

@ -57,7 +57,6 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
users = { users = {
mutableUsers = true; 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);
}
);
};
}; };
} }

View file

@ -253,7 +253,8 @@ in
createHome = true; createHome = true;
initialPassword = "${name}-browser"; initialPassword = "${name}-browser";
shell = pkgs.bashInteractive; shell = pkgs.bashInteractive;
isNormalUser = true; isNormalUser = false;
isSystemUser = true;
group = "users"; group = "users";
# enable video usage # enable video usage
extraGroups = [ "audio" "pipewire" ] ++ (if config.gpu then [ "video" ] else [ ]); extraGroups = [ "audio" "pipewire" ] ++ (if config.gpu then [ "video" ] else [ ]);

View file

@ -29,11 +29,14 @@ in
]; ];
users.users.steam = { users.users.steam = {
isNormalUser = true; isNormalUser = false;
isSystemUser = true;
home = "/home/steam"; home = "/home/steam";
createHome = true; createHome = true;
extraGroups = [ "audio" "input" "video" "pipewire" ]; extraGroups = [ "audio" "input" "video" "pipewire" ];
group = "steam";
}; };
users.groups.steam = { };
# for steam # for steam
# --------- # ---------