infra/pastila/weechat-relay.nix

19 lines
456 B
Nix
Raw Normal View History

2024-06-01 17:34:21 +00:00
{ config, lib, pkgs, ... }:
let
mkProxy = port: {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:" + builtins.toString port + "/weechat";
proxyWebsockets = true;
extraConfig = ''
proxy_read_timeout 604800; # Prevent idle disconnects
'';
};
};
in
{
services.nginx.enable = true;
services.nginx.virtualHosts."relayjq.isomorphis.me" = mkProxy 9001;
}