Fix setting programs.ssh.setXAuthLocation

The configuration { services.openssh.enable = true;
services.openssh.forwardX11 = false; } caused
programs.ssh.setXAuthLocation to be set to false, which was not the
intent. The intent is that programs.ssh.setXAuthLocation should be
automatically enabled if needed or if xauth is already available.

Changed files
+1 -3
nixos
modules
programs
services
networking
ssh
+1 -1
nixos/modules/programs/ssh.nix
···
config = {
programs.ssh.setXAuthLocation =
-
mkDefault (config.services.xserver.enable || config.programs.ssh.forwardX11);
assertions =
[ { assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
···
config = {
programs.ssh.setXAuthLocation =
+
mkDefault (config.services.xserver.enable || config.programs.ssh.forwardX11 || config.services.openssh.forwardX11);
assertions =
[ { assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
-2
nixos/modules/services/networking/ssh/sshd.nix
···
config = mkIf cfg.enable {
-
programs.ssh.setXAuthLocation = mkForce cfg.forwardX11;
-
users.extraUsers.sshd =
{ isSystemUser = true;
description = "SSH privilege separation user";
···
config = mkIf cfg.enable {
users.extraUsers.sshd =
{ isSystemUser = true;
description = "SSH privilege separation user";