enable Jackett for torrent searching

This commit is contained in:
Colin 2022-05-04 00:10:32 +00:00
parent b7f9037807
commit 490a35cde0
5 changed files with 46 additions and 0 deletions

View File

@ -11,6 +11,7 @@
./hardware-configuration.nix
./net-configuration.nix
./services-conf/gitea-configuration.nix
./services-conf/jackett-configuration.nix
./services-conf/jellyfin-configuration.nix
./services-conf/matrix-configuration.nix
./services-conf/nginx-configuration.nix
@ -24,6 +25,7 @@
nixpkgs.overlays = [
(self: super: {
pleroma = super.callPackage ./pkgs/pleroma { };
jackett = self.callPackage ./pkgs/jackett { pkgs = super; };
})
];

View File

@ -0,0 +1,13 @@
diff --git a/src/Jackett.Common/Models/Config/ServerConfig.cs b/src/Jackett.Common/Models/Config/ServerConfig.cs
index 4bd02c42e..49c2d91ff 100644
--- a/src/Jackett.Common/Models/Config/ServerConfig.cs
+++ b/src/Jackett.Common/Models/Config/ServerConfig.cs
@@ -102,6 +102,7 @@ namespace Jackett.Common.Models.Config
public string[] GetListenAddresses(bool? external = null)
{
+ return new string[] { "http://0.0.0.0:" + Port + "/" };
if (external == null)
{
external = AllowExternal;

9
pkgs/jackett/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs }:
(pkgs.jackett.overrideAttrs (upstream: {
patches = [
# bind to an IP address which is usable behind a netns
./01-fix-bind-host.patch
];
}))

View File

@ -0,0 +1,14 @@
{ config, pkgs, lib, ... }:
{
services.jackett.enable = true;
systemd.services.jackett.after = ["wireguard-wg0.service"];
systemd.services.jackett.serviceConfig = {
# run this behind the OVPN static VPN
NetworkNamespacePath = "/run/netns/ovpns";
# patch jackett to listen on the public interfaces
# ExecStart = lib.mkForce "${pkgs.jackett}/bin/Jackett --NoUpdates --DataFolder /var/lib/jackett/.config/Jackett --ListenPublic";
};
}

View File

@ -98,6 +98,14 @@
};
};
services.nginx.virtualHosts."jackett.uninsane.org" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://ovpns.uninsane.org:9117";
};
};
services.nginx.virtualHosts."matrix.uninsane.org" = {
addSSL = true;
enableACME = true;