summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-11-21 16:17:35 +0100
committerEelco Dolstra <edolstra@gmail.com>2016-11-21 16:19:51 +0100
commitd69dce080daf2c7004a79950e73dba6545b9097e (patch)
treec83414cb880534d3f0edf0d13e89b3c7f5aea9f1 /nixos/modules
parent6e08a5547403c28aa53c97c1509298995f2f7200 (diff)
downloadnixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar.gz
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar.bz2
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar.lz
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar.xz
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.tar.zst
nixlib-d69dce080daf2c7004a79950e73dba6545b9097e.zip
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.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/ssh.nix2
-rw-r--r--nixos/modules/services/networking/ssh/sshd.nix2
2 files changed, 1 insertions, 3 deletions
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";