···15311531 (map (module: "mr ${module},"))
15321532 concatLines
15331533 ]);
15341534- };
1535153415351535+ security.sudo.extraConfig = optionalString config.security.pam.enableSSHAgentAuth ''
15361536+ # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
15371537+ Defaults env_keep+=SSH_AUTH_SOCK
15381538+ '';
15391539+ };
15361540}
+4-4
nixos/modules/security/sudo.nix
···6677 cfg = config.security.sudo;
8899+ inherit (config.security.pam) enableSSHAgentAuth;
1010+911 toUserString = user: if (isInt user) then "#${toString user}" else "${user}";
1012 toGroupString = group: if (isInt group) then "%#${toString group}" else "%${group}";
1113···207209 ''
208210 # Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
209211 # or ‘security.sudo.extraRules’ instead.
210210-211211- # Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
212212- Defaults env_keep+=SSH_AUTH_SOCK
213213-212212+ ''
213213+ ''
214214 # "root" is allowed to do anything.
215215 root ALL=(ALL:ALL) SETENV: ALL
216216 ''