Files
nixos-configs/hosts/common/users/dwessels/default.nix
2025-12-31 12:01:37 +01:00

42 lines
818 B
Nix

{
pkgs,
config,
lib,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.mutableUsers = false;
users.users.dwessels = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ifTheyExist [
"audio"
"deluge"
"docker"
"git"
"i2c"
"libvirtd"
"mysql"
"network"
"plugdev"
"video"
"wheel"
"wireshark"
];
hashedPasswordFile = config.sops.secrets.dwessels-password.path;
};
sops.secrets.dwessels-password = {
sopsFile = ../../secrets.yaml;
neededForUsers = true;
};
home-manager.users.dwessels = import ../../../../home/dwessels/${config.networking.hostName}.nix;
security.pam.services = {
swaylock = {};
hyprlock = {};
};
}