summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRodney Lorrimar <dev@rodney.id.au>2018-04-02 11:04:53 +0100
committerRodney Lorrimar <dev@rodney.id.au>2018-04-02 11:09:57 +0100
commitd06b547cc00932dc836d1876c2ac15aaf62f3940 (patch)
tree3d34170447705993bb7f46480143a9035835d1dc /nixos
parent56fb68dcef494b7cdb3e09362d67836b8137019c (diff)
downloadnixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar.gz
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar.bz2
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar.lz
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar.xz
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.tar.zst
nixlib-d06b547cc00932dc836d1876c2ac15aaf62f3940.zip
znc: add uriPrefix option
Allows the ZNC web interface to be hosted behind a reverse proxy as a
subdirectory.

https://wiki.znc.in/Reverse_Proxy#As_subdirectory
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/znc.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/znc.nix b/nixos/modules/services/networking/znc.nix
index 72313ab2ee14..149c9a4cb9ef 100644
--- a/nixos/modules/services/networking/znc.nix
+++ b/nixos/modules/services/networking/znc.nix
@@ -36,6 +36,7 @@ let
             IPv4 = true
             IPv6 = true
             SSL = ${boolToString confOpts.useSSL}
+            ${lib.optionalString (confOpts.uriPrefix != null) "URIPrefix = ${confOpts.uriPrefix}"}
     </Listener>
 
     <User ${confOpts.userName}>
@@ -310,6 +311,16 @@ in
           '';
         };
 
+        uriPrefix = mkOption {
+          type = types.nullOr types.str;
+          default = null;
+          example = "/znc/";
+          description = ''
+            An optional URI prefix for the ZNC web interface. Can be
+            used to make ZNC available behind a reverse proxy.
+          '';
+        };
+
         extraZncConf = mkOption {
           default = "";
           type = types.lines;