diff options
| author | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
|---|---|---|
| committer | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
| commit | 39a2b09c27bb74c9e59d1772764f901e3c8fb9e4 (patch) | |
| tree | 0ba58e6fbf086a85d875df1c10f6d23bc3bbc7da /modules/tor.nix | |
| parent | 8a820cacee1ff07ae7397d053b26e66f7086a4a4 (diff) | |
revamped flake.nix, removed homelab specific modulesstaging
Diffstat (limited to 'modules/tor.nix')
| -rw-r--r-- | modules/tor.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/tor.nix b/modules/tor.nix new file mode 100644 index 0000000..8777fba --- /dev/null +++ b/modules/tor.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.os.srv.tor; +in +{ + options.os.srv.tor = { + enable = lib.mkEnableOption "enables tor services"; + enableBrowser = lib.mkEnableOption "enables the tor browser"; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.enable { + services.tor = { + enable = true; + client = { + enable = true; + dns.enable = true; + transparentProxy.enable = true; + }; + }; + }) + (lib.mkIf cfg.enableBrowser { + environment.systemPackages = [ pkgs.tor-browser ]; + }) + ]; +} |
