Skip to content

Commit

Permalink
Revert "feat(server/torrserver): include jackett"
Browse files Browse the repository at this point in the history
jacred.ru => jacred.xyz

This reverts commit dcc4e49.
  • Loading branch information
mrtnvgr committed Sep 23, 2024
1 parent 8ed45eb commit 6b300b5
Showing 1 changed file with 9 additions and 28 deletions.
37 changes: 9 additions & 28 deletions modules/server/misc/torrserver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ in {
default = 8090;
};

jackettPort = mkOption {
type = types.port;
default = 9117;
};

expose = mkEnableOption "expose torrserver in firewall";

users = mkOption {
Expand Down Expand Up @@ -96,33 +91,19 @@ in {
networking.firewall.allowedTCPPorts = mkIf cfg.expose [ cfg.port ];
networking.firewall.allowedUDPPorts = mkIf cfg.expose [ cfg.port ];

services.nginx.virtualHosts = mkIf webIsSupported {
"ts.${domain}" = {
locations = {
"/" = {
proxyPass = "http://localhost:${toString cfg.port}";
};

"= /" = {
basicAuth = cfg.webUsers;
};
services.nginx.virtualHosts."ts.${domain}" = mkIf webIsSupported {
locations = {
"/" = {
proxyPass = "http://localhost:${toString cfg.port}";
};

enableACME = true;
forceSSL = true;
};

"jck.${domain}" = {
locations."/".proxyPass = "http://localhost:${toString config.modules.server.misc.torrserver.jackettPort}";

enableACME = true;
forceSSL = true;
"= /" = {
basicAuth = cfg.webUsers;
};
};
};

services.jackett = {
enable = true;
openFirewall = cfg.expose;
enableACME = true;
forceSSL = true;
};
};
}

0 comments on commit 6b300b5

Please sign in to comment.