lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nixos/services.tor.tsocks: remove `with lib;`

+9 -10
+9 -10
nixos/modules/services/security/torify.nix
··· 4 4 pkgs, 5 5 ... 6 6 }: 7 - with lib; 8 7 let 9 8 10 9 cfg = config.services.tor; ··· 29 28 30 29 services.tor.tsocks = { 31 30 32 - enable = mkOption { 33 - type = types.bool; 31 + enable = lib.mkOption { 32 + type = lib.types.bool; 34 33 default = false; 35 34 description = '' 36 35 Whether to build tsocks wrapper script to relay application traffic via Tor. ··· 45 44 ''; 46 45 }; 47 46 48 - server = mkOption { 49 - type = types.str; 47 + server = lib.mkOption { 48 + type = lib.types.str; 50 49 default = "localhost:9050"; 51 50 example = "192.168.0.20"; 52 51 description = '' ··· 54 53 ''; 55 54 }; 56 55 57 - config = mkOption { 58 - type = types.lines; 56 + config = lib.mkOption { 57 + type = lib.types.lines; 59 58 default = ""; 60 59 description = '' 61 60 Extra configuration. Contents will be added verbatim to TSocks ··· 69 68 70 69 ###### implementation 71 70 72 - config = mkIf cfg.tsocks.enable { 71 + config = lib.mkIf cfg.tsocks.enable { 73 72 74 73 environment.systemPackages = [ torify ]; # expose it to the users 75 74 76 75 services.tor.tsocks.config = '' 77 - server = ${toString (head (splitString ":" cfg.tsocks.server))} 78 - server_port = ${toString (tail (splitString ":" cfg.tsocks.server))} 76 + server = ${toString (lib.head (lib.splitString ":" cfg.tsocks.server))} 77 + server_port = ${toString (lib.tail (lib.splitString ":" cfg.tsocks.server))} 79 78 80 79 local = 127.0.0.0/255.128.0.0 81 80 local = 127.128.0.0/255.192.0.0