diff --git a/nixos/modules/security/sudo-rs.nix b/nixos/modules/security/sudo-rs.nix index a157bfebfab7..7fa795270b8b 100644 --- a/nixos/modules/security/sudo-rs.nix +++ b/nixos/modules/security/sudo-rs.nix @@ -298,13 +298,20 @@ in environment.systemPackages = [ cfg.package ]; - security.pam.services.sudo = { - sshAgentAuth = true; - usshAuth = true; - }; - security.pam.services.sudo-i = { - sshAgentAuth = true; - usshAuth = true; + security.pam.services = { + su-l = { + rootOK = true; + forwardXAuth = true; + logFailures = true; + }; + sudo = { + sshAgentAuth = true; + usshAuth = true; + }; + sudo-i = { + sshAgentAuth = true; + usshAuth = true; + }; }; environment.etc.sudoers = {