summary refs log tree commit diff stats
path: root/system/modules/programs/tor.nix
diff options
context:
space:
mode:
Diffstat (limited to 'system/modules/programs/tor.nix')
-rw-r--r--system/modules/programs/tor.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/system/modules/programs/tor.nix b/system/modules/programs/tor.nix
new file mode 100644
index 00000000..5524aede
--- /dev/null
+++ b/system/modules/programs/tor.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.tor = {
+    enable = true;
+    client = {
+      enable = true;
+      socksListenAddress = "9050 IPv6Traffic";
+    };
+    torsocks = {
+      enable = true;
+    };
+  };
+  systemd.services.tor.wantedBy = lib.mkForce [];
+  systemd.timers.tor = {
+    description = "Delayed startup of Tor";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
+  };
+}