From 8c349a9e71961c9b599c0cfa46aa11c085085e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org> Date: Sun, 22 Nov 2009 00:40:48 +0000 Subject: [PATCH] Fix the OpenSSH/GnuPG agent assertion. svn path=/nixos/trunk/; revision=18514 --- modules/services/x11/xserver.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix index ee6f7c50f12..62fb26f829e 100644 --- a/modules/services/x11/xserver.nix +++ b/modules/services/x11/xserver.nix @@ -340,11 +340,14 @@ in message = "The X server needs HAL running. Set services.hal.enable to true"; } - { assertion = (cfg.startSSHAgent -> !cfg.startGnuPGAgent) - && (cfg.startGnuPGAgent -> !cfg.startSSHAgent); + { assertion = if cfg.startSSHAgent + then !cfg.startGnuPGAgent + else (if cfg.startGnuPGAgent + then !cfg.startSSHAgent + else true); message = - "The OpenSSH SSH agent and GnuPG agent cannot be started " + - "both. Choose between `startSSHAgent' and `startGnuPGAgent'."; + "The OpenSSH agent and GnuPG agent cannot be started both. " + "Choose between `startSSHAgent' and `startGnuPGAgent'."; } ];