mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
27 lines
550 B
Nix
27 lines
550 B
Nix
{
|
|
config,
|
|
std,
|
|
...
|
|
}: let
|
|
inherit (std) list set;
|
|
commonUser = {
|
|
openssh.authorizedKeys.keys = list.concat (set.mapToValues
|
|
(_: user:
|
|
if list.elem "wheel" user.extraGroups
|
|
then user.openssh.authorizedKeys.keys
|
|
else [])
|
|
config.users.users);
|
|
};
|
|
in {
|
|
security.pam.enableSSHAgentAuth = true;
|
|
security.sudo.enable = true;
|
|
security.pam.services.sudo.sshAgentAuth = true;
|
|
users.users = {
|
|
root = commonUser;
|
|
deploy =
|
|
commonUser
|
|
// {
|
|
isNormalUser = true;
|
|
};
|
|
};
|
|
}
|