From 72ca782044b7fa83c3efceeb07b18ab395f7a5b1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Oct 2013 15:47:30 +0200 Subject: [PATCH] Fix an assertion set in the wrong place --- nixos/modules/programs/ssh.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index 5ec32376b60e..64bf25083163 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 xauth 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.