mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
30 lines
514 B
Nix
30 lines
514 B
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.system.tor;
|
|
|
|
in
|
|
{
|
|
options.modules.system.tor = {
|
|
enable = mkEnableOption "Tor";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.tor = {
|
|
enable = true;
|
|
|
|
client = {
|
|
enable = true;
|
|
# SOCKS proxy on 127.0.0.1:9050
|
|
};
|
|
|
|
settings = {
|
|
ControlPort = 9051;
|
|
CookieAuthentication = true;
|
|
CookieAuthFileGroupReadable = true;
|
|
DataDirectoryGroupReadable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|