about summary refs log tree commit diff
path: root/nixos/tests/tor.nix
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-03-18 01:27:04 +0100
committerNaïm Favier <n@monade.li>2022-03-18 02:44:11 +0100
commitca8c877f8cd1f9b84e8aa57741aa5cd60a3a2ba3 (patch)
tree9908d4c8cd984dbdaf355c320382b51e92b47580 /nixos/tests/tor.nix
parent79a234567c01399c5f1ae1d0b60ac84d12075b3b (diff)
nixos/tests: fix some evaluation errors
Fixes errors caught by "nixos/testing: restrict arguments to makeTest" as
well as some unrelated errors and warnings.
Diffstat (limited to 'nixos/tests/tor.nix')
-rw-r--r--nixos/tests/tor.nix25
1 files changed, 10 insertions, 15 deletions
diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix
index c061f59226cfb..71ec9df4641fa 100644
--- a/nixos/tests/tor.nix
+++ b/nixos/tests/tor.nix
@@ -1,24 +1,19 @@
 import ./make-test-python.nix ({ lib, ... }: with lib;
 
-rec {
+{
   name = "tor";
   meta.maintainers = with maintainers; [ joachifm ];
 
-  common =
-    { ... }:
-    { boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
-      networking.firewall.enable = false;
-      networking.useDHCP = false;
-    };
+  nodes.client = { pkgs, ... }: {
+    boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
+    networking.firewall.enable = false;
+    networking.useDHCP = false;
 
-  nodes.client =
-    { pkgs, ... }:
-    { imports = [ common ];
-      environment.systemPackages = with pkgs; [ netcat ];
-      services.tor.enable = true;
-      services.tor.client.enable = true;
-      services.tor.settings.ControlPort = 9051;
-    };
+    environment.systemPackages = with pkgs; [ netcat ];
+    services.tor.enable = true;
+    services.tor.client.enable = true;
+    services.tor.settings.ControlPort = 9051;
+  };
 
   testScript = ''
     client.wait_for_unit("tor.service")