nix-dotfiles/users/default.nix

29 lines
618 B
Nix
Raw Normal View History

2023-12-27 10:03:13 +01:00
{ 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;
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-25 03:39:20 +01:00
shell = pkgs.${defaultShell};
2023-12-26 19:06:02 +01:00
hashedPasswordFile = config.sops.secrets."${name}/user-password".path;
2023-12-25 18:54:38 +01:00
openssh.authorizedKeys.keys = publicKeys;
2023-12-27 10:03:13 +01:00
}