nix-dotfiles/users/default.nix
Dennis 4c1e86907a dennis the formatter (#75)
* dennis the formatter

* changed comment

* fixup
2024-02-05 22:45:43 +01:00

22 lines
668 B
Nix

{ lib, config, pkgs, name, publicKeys ? [ ], defaultShell ? "zsh", }:
{
inherit name;
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;
extraGroups = [
"wheel"
"media"
(lib.mkIf config.networking.networkmanager.enable "networkmanager")
(lib.mkIf config.programs.adb.enable "adbusers")
(lib.mkIf config.programs.wireshark.enable "wireshark")
(lib.mkIf config.virtualisation.docker.enable "docker")
"libvirtd"
"dialout"
"plugdev"
"uaccess"
];
}