nix-dotfiles/users/default.nix

29 lines
680 B
Nix
Raw Normal View History

{
lib,
config,
pkgs,
name,
publicKeys ? [ ],
defaultShell ? "zsh",
}:
2023-12-25 03:39:20 +01:00
{
inherit name;
2023-12-24 18:48:52 +01:00
isNormalUser = true;
shell = lib.mkIf config.programs.${defaultShell}.enable pkgs.${defaultShell};
hashedPasswordFile = config.sops.secrets."${name}/user-password".path or null;
openssh.authorizedKeys.keys = publicKeys;
2023-12-24 18:48:52 +01:00
extraGroups = [
"wheel"
"media"
(lib.mkIf config.networking.networkmanager.enable "networkmanager")
(lib.mkIf config.programs.adb.enable "adbusers")
(lib.mkIf config.programs.wireshark.enable "wireshark")
2023-12-25 03:39:20 +01:00
(lib.mkIf config.virtualisation.docker.enable "docker")
2023-12-24 18:48:52 +01:00
"libvirtd"
"dialout"
"plugdev"
"uaccess"
];
2023-12-27 10:03:13 +01:00
}