From 0a434c3b240f17c51599588b9bd79001f671265d Mon Sep 17 00:00:00 2001 From: Rohan Datar Date: Sat, 4 Jan 2025 17:56:38 -0600 Subject: [PATCH] remove vpn options for flaresolverr --- nixarr/flaresolverr/default.nix | 62 ++------------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/nixarr/flaresolverr/default.nix b/nixarr/flaresolverr/default.nix index 529aeb7..a33d72e 100644 --- a/nixarr/flaresolverr/default.nix +++ b/nixarr/flaresolverr/default.nix @@ -7,7 +7,6 @@ with lib; let cfg = config.nixarr.flaresolverr; nixarr = config.nixarr; - defaultPort = 8191; in { options.nixarr.flaresolverr = { enable = mkOption { @@ -25,28 +24,16 @@ in { port = mkOption { type = types.port; - default = defaultPort; + default = 8191; example = 12345; description = "Flaresolverr port."; }; openFirewall = mkOption { - type = types.bool; - defaultText = literalExpression ''!nixarr.flaresolverr.vpn.enable''; - default = !cfg.vpn.enable; - example = true; - description = "Open firewall for Flaresolverr"; - }; - - vpn.enable = mkOption { type = types.bool; default = false; example = true; - description = '' - **Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable) - - Route Jellyseerr traffic through the VPN. - ''; + description = "Open firewall for Flaresolverr"; }; }; @@ -59,13 +46,6 @@ in { nixarr.enable option to be set, but it was not. ''; } - { - assertion = cfg.vpn.enable -> nixarr.vpn.enable; - message = '' - The nixarr.flaresolverr.vpn.enable option requires the - nixarr.vpn.enable option to be set, but it was not. - ''; - } ]; services.flaresolverr = { @@ -74,43 +54,5 @@ in { openFirewall = cfg.openFirewall; port = cfg.port; }; - - # Enable and specify VPN namespace to confine service in. - systemd.services.flaresolverr.vpnConfinement = mkIf cfg.vpn.enable { - enable = true; - vpnNamespace = "wg"; - }; - - # Port mappings - vpnNamespaces.wg = mkIf cfg.vpn.enable { - portMappings = [ - { - from = defaultPort; - to = defaultPort; - } - ]; - }; - - services.nginx = mkIf cfg.vpn.enable { - enable = true; - - recommendedTlsSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - - virtualHosts."127.0.0.1:${builtins.toString defaultPort}" = { - listen = [ - { - addr = "0.0.0.0"; - port = defaultPort; - } - ]; - locations."/" = { - recommendedProxySettings = true; - proxyWebsockets = true; - proxyPass = "http://192.168.15.1:${builtins.toString defaultPort}"; - }; - }; - }; }; }