summary refs log tree commit diff
path: root/modules/services/security/tor.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/security/tor.nix')
-rw-r--r--modules/services/security/tor.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/services/security/tor.nix b/modules/services/security/tor.nix
index 65b7abafd6a2..6e1b2838ead6 100644
--- a/modules/services/security/tor.nix
+++ b/modules/services/security/tor.nix
@@ -218,12 +218,10 @@ in
 
   ###### implementation
 
-  config = mkIf (cfg.client.enable || cfg.relay.enable) {
-
-    assertions = [ {
-      assertion = cfg.relay.enable -> !(cfg.relay.isBridge && cfg.relay.isExit);
-      message = "Can't be both an exit and a bridge relay at the same time";
-    } ];
+  config = mkIf (cfg.client.enable || cfg.relay.enable) (
+  mkAssert (cfg.relay.enable -> !(cfg.relay.isBridge && cfg.relay.isExit)) "
+    Can't be both an exit and a bridge relay at the same time
+  " {
 
     users.extraUsers = singleton
       { name = torUser;
@@ -308,6 +306,6 @@ in
         # Extra config goes here
       '';
      
-  };
+  });
   
 }