diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index b6fd9868f98f..5f4d4dc9475e 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -165,7 +165,7 @@ in config = { programs.ssh.setXAuthLocation = - mkDefault (config.services.xserver.enable || config.programs.ssh.forwardX11); + mkDefault (config.services.xserver.enable || config.programs.ssh.forwardX11 || config.services.openssh.forwardX11); assertions = [ { assertion = cfg.forwardX11 -> cfg.setXAuthLocation; diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 81941ce1cfb6..073391ffdbbc 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -228,8 +228,6 @@ in config = mkIf cfg.enable { - programs.ssh.setXAuthLocation = mkForce cfg.forwardX11; - users.extraUsers.sshd = { isSystemUser = true; description = "SSH privilege separation user";