2021-12-08 16:39:00 +00:00
|
|
|
{ lib, ... }:
|
2021-10-21 14:51:44 +01:00
|
|
|
|
2021-12-08 16:39:00 +00:00
|
|
|
let
|
|
|
|
domain = "htpro.giugl.io";
|
|
|
|
network = import ./network.nix;
|
|
|
|
in {
|
2021-09-25 17:21:27 +01:00
|
|
|
services = {
|
|
|
|
prowlarr.enable = true;
|
|
|
|
|
2021-12-08 16:39:00 +00:00
|
|
|
nginx.virtualHosts.${domain} = {
|
2021-09-25 17:21:27 +01:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
2022-11-11 18:10:38 +00:00
|
|
|
proxyPass = "http://127.0.0.1:9696";
|
2021-09-25 17:21:27 +01:00
|
|
|
extraConfig = ''
|
|
|
|
allow 10.0.0.0/24;
|
2021-12-08 16:58:01 +00:00
|
|
|
${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg}
|
2021-09-25 17:21:27 +01:00
|
|
|
deny all;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-11-25 11:42:32 +00:00
|
|
|
# locations."/api" = {
|
|
|
|
# proxyPass = "http://127.0.0.1:9696/prowlarr/api";
|
|
|
|
# };
|
|
|
|
#
|
|
|
|
# locations."/Content" = {
|
|
|
|
# proxyPass = "http://127.0.0.1:9696/prowlarr/Content";
|
|
|
|
# };
|
2021-09-25 17:21:27 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.extraHosts = ''
|
2021-12-08 16:39:00 +00:00
|
|
|
${network.architect-lan} ${domain}
|
|
|
|
${network.architect-wg} ${domain}
|
2021-09-25 17:21:27 +01:00
|
|
|
'';
|
|
|
|
|
2021-11-25 11:42:32 +00:00
|
|
|
users.groups.media.members = [ "prowlarr" ];
|
2021-09-25 17:21:27 +01:00
|
|
|
}
|