From 7404c06f3007ece43788ffa5941a97ab8b559e9a Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Tue, 5 Aug 2025 12:38:37 -0400 Subject: [PATCH] sudo-rs: add pam.services.su-l for su -l --- nixos/modules/security/sudo-rs.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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 = {