summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-25 15:47:30 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-25 15:47:30 +0200
commit72ca782044b7fa83c3efceeb07b18ab395f7a5b1 (patch)
treeba6348862970a8bf93f4ae2001faadb16c5429f4 /nixos
parentab94ccfc38df04b7f9d101f00e0a4b6410322702 (diff)
downloadnixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar.gz
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar.bz2
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar.lz
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar.xz
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.tar.zst
nixpkgs-72ca782044b7fa83c3efceeb07b18ab395f7a5b1.zip
Fix an assertion set in the wrong place
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/programs/ssh.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index 5ec32376b60..64bf2508316 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/nixos/modules/programs/ssh.nix
@@ -1,6 +1,6 @@
 # Global configuration for the SSH client.
 
-{config, pkgs, ...}:
+{ config, pkgs, ... }:
 
 with pkgs.lib;
 
@@ -31,7 +31,7 @@ in
       setXAuthLocation = mkOption {
         default = true;
         description = ''
-          Whether to set the path to xauth for X11-forwarded connections.
+          Whether to set the path to <command>xauth</command> for X11-forwarded connections.
           Pulls in X11 dependency.
         '';
       };
@@ -46,10 +46,13 @@ in
     };
   };
 
-  assertions = [{ assertion = if cfg.forwardX11 then cfg.setXAuthLocation else true;
-                  message = "cannot enable X11 forwarding without setting xauth location";}];
-
   config = {
+
+    assertions = singleton
+      { assertion = cfg.forwardX11 -> cfg.setXAuthLocation;
+        message = "cannot enable X11 forwarding without setting XAuth location";
+      };
+
     environment.etc =
       [ { # SSH configuration.  Slight duplication of the sshd_config
           # generation in the sshd service.