From 6c19b0636125e67ddf61942107adfa766ebc34d7 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 22 Oct 2023 19:19:56 +0000 Subject: [PATCH] nixos/sudo-rs: uniformize ssh-agent auth behaviour with `security.sudo` (cherry picked from commit cd42b18a2c16f9bceaa282f693d24c6d5b30d7b8) --- nixos/modules/security/sudo-rs.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/security/sudo-rs.nix b/nixos/modules/security/sudo-rs.nix index 3f872e76df2c..2ef9cae8caf8 100644 --- a/nixos/modules/security/sudo-rs.nix +++ b/nixos/modules/security/sudo-rs.nix @@ -4,13 +4,10 @@ with lib; let - inherit (pkgs) sudo sudo-rs; - cfg = config.security.sudo-rs; - enableSSHAgentAuth = - with config.security; - pam.enableSSHAgentAuth && pam.sudo.sshAgentAuth; + inherit (config.security.pam) enableSSHAgentAuth; + inherit (pkgs) sudo sudo-rs; usingMillersSudo = cfg.package.pname == sudo.pname; usingSudoRs = cfg.package.pname == sudo-rs.pname;