ma sickbeard: use correct external ip
This commit is contained in:
parent
c0c3f87718
commit
1cdf83f236
|
@ -1,20 +1,23 @@
|
||||||
{ }:
|
{ pkgs, config, ... }:
|
||||||
{ services.sickbeard = let
|
let
|
||||||
pkg = pkgs.callPackage ./sickgear.nix {};
|
pkg = pkgs.callPackage ./sickgear.nix {};
|
||||||
|
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
|
||||||
in {
|
in {
|
||||||
enable = true;
|
services.sickbeard =
|
||||||
package = pkg;
|
{
|
||||||
user = "sickbeard";
|
enable = true;
|
||||||
group = "download";
|
package = pkg;
|
||||||
port = 8280;
|
user = "sickbeard";
|
||||||
};
|
group = "download";
|
||||||
services.nginx.virtualHosts."sick.makefu.r" = {
|
port = 8280;
|
||||||
locations."/".proxyPass = http://localhost:8280;
|
};
|
||||||
extraConfig = ''
|
services.nginx.virtualHosts."sick.makefu.r" = {
|
||||||
if ( $server_addr = "${external-ip}" ) {
|
locations."/".proxyPass = http://localhost:8280;
|
||||||
return 403;
|
extraConfig = ''
|
||||||
|
if ( $server_addr = "${external-ip}" ) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
users.users.sickbeard.extraGroups = [ "nginx" ];
|
||||||
}
|
}
|
||||||
'';
|
|
||||||
};
|
|
||||||
users.users.sickbeard.extraGroups = [ "nginx" ];
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue