nix-config/hosts/common/global/user.nix

46 lines
807 B
Nix
Raw Normal View History

2023-12-24 11:16:59 +01:00
{
2023-12-25 23:11:54 +01:00
inputs,
outputs,
2023-12-24 11:16:59 +01:00
pkgs,
config,
2023-12-25 23:11:54 +01:00
vars,
2023-12-24 11:16:59 +01:00
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
2023-12-25 23:11:54 +01:00
users.users.${vars.user} = {
2023-12-24 11:16:59 +01:00
isNormalUser = true;
shell = pkgs.fish;
extraGroups =
[
"wheel"
"video"
"audio"
"camera"
]
++ ifTheyExist [
"minecraft"
"network"
"networkmanager"
"wireshark"
"i2c"
"mysql"
"docker"
"podman"
"git"
"libvirtd"
"deluge"
"lp"
"scanner"
"kvm"
"libvirtd"
"tty"
"dialout"
];
packages = [pkgs.home-manager];
};
2023-12-26 11:49:58 +01:00
home-manager.users.${vars.user} = import ../../../home/${config.networking.hostName}.nix;
2023-12-24 11:16:59 +01:00
}