about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-03-10 00:39:07 +0000
committerGitHub <noreply@github.com>2021-03-10 00:39:07 +0000
commit149a81c88d05f974d8dd11e111ad09b502b338b1 (patch)
tree7ff3d07f00243f0096d02de131e21a577db05dff /nixos/modules
parentcf320b516a167a923032f44da4955b885738fa8b (diff)
parent6bd4e08c3453e544d3d61ca845d7ab0f1507c374 (diff)
Merge master into staging-next
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/privoxy.nix20
-rw-r--r--nixos/modules/services/web-apps/whitebophir.nix9
2 files changed, 25 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/privoxy.nix b/nixos/modules/services/networking/privoxy.nix
index b8d3391634250..f1a9c6029cb07 100644
--- a/nixos/modules/services/networking/privoxy.nix
+++ b/nixos/modules/services/networking/privoxy.nix
@@ -165,15 +165,29 @@ in
       };
       default = {};
       example = literalExample ''
-        { listen-address = "[::]:8118";               # listen on IPv6 only
-          forward-socks5 = ".onion localhost:9050 ."; # forward .onion requests to Tor
+        { # Listen on IPv6 only
+          listen-address = "[::]:8118";
+
+          # Forward .onion requests to Tor
+          forward-socks5 = ".onion localhost:9050 .";
+
+          # Log redirects and filters
+          debug = [ 128 64 ];
+          # This is equivalent to writing these lines
+          # in the Privoxy configuration file:
+          # debug 128
+          # debug 64
         }
       '';
       description = ''
         This option is mapped to the main Privoxy configuration file.
         Check out the Privoxy user manual at
-        <link xlink:href="file://${pkgs.privoxy}/share/doc/privoxy/user-manual/config.html"/>
+        <link xlink:href="https://www.privoxy.org/user-manual/config.html"/>
         for available settings and documentation.
+
+        <note><para>
+          Repeated settings can be represented by using a list.
+        </para></note>
       '';
     };
 
diff --git a/nixos/modules/services/web-apps/whitebophir.nix b/nixos/modules/services/web-apps/whitebophir.nix
index a19812547c448..b265296d5c1eb 100644
--- a/nixos/modules/services/web-apps/whitebophir.nix
+++ b/nixos/modules/services/web-apps/whitebophir.nix
@@ -16,6 +16,12 @@ in {
         description = "Whitebophir package to use.";
       };
 
+      listenAddress = mkOption {
+        type = types.str;
+        default = "0.0.0.0";
+        description = "Address to listen on (use 0.0.0.0 to allow access from any address).";
+      };
+
       port = mkOption {
         type = types.port;
         default = 5001;
@@ -30,7 +36,8 @@ in {
       wantedBy    = [ "multi-user.target" ];
       after       = [ "network.target" ];
       environment = {
-        PORT            = "${toString cfg.port}";
+        PORT            = toString cfg.port;
+        HOST            = toString cfg.listenAddress;
         WBO_HISTORY_DIR = "/var/lib/whitebophir";
       };