nix-dotfiles/users/default.nix
Alice Huston 1a8a2fa394
Feature/rfc 0166 fmt (#113)
* change formatter to nixfmt-rfc-style

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* Add rfc-style fmt'ing

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

---------

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
2024-03-03 18:06:28 -05:00

29 lines
680 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"
];
}