summary refs log tree commit diff
path: root/nixos/modules/programs/ssh.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-05 15:38:42 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-05 15:38:42 +0200
commitf3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b (patch)
tree3acc20e0aa7bc5a475fa0a005b82fd180d2fc0ec /nixos/modules/programs/ssh.nix
parente8315cb1caac6343322b5bab822f3cd227ae287b (diff)
downloadnixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar.gz
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar.bz2
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar.lz
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar.xz
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.tar.zst
nixlib-f3c32cb2c1344c9a831bb9e4f47c1b20527dbe0b.zip
Let services.openssh.forwardX11 imply programs.ssh.setXAuthLocation
Diffstat (limited to 'nixos/modules/programs/ssh.nix')
-rw-r--r--nixos/modules/programs/ssh.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index cc835081c9f9..b6fd9868f98f 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/nixos/modules/programs/ssh.nix
@@ -56,7 +56,6 @@ in
 
       setXAuthLocation = mkOption {
         type = types.bool;
-        default = config.services.xserver.enable;
         description = ''
           Whether to set the path to <command>xauth</command> for X11-forwarded connections.
           This causes a dependency on X11 packages.
@@ -165,6 +164,9 @@ in
 
   config = {
 
+    programs.ssh.setXAuthLocation =
+      mkDefault (config.services.xserver.enable || config.programs.ssh.forwardX11);
+
     assertions =
       [ { assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
           message = "cannot enable X11 forwarding without setting XAuth location";