ma sickbeard: use correct external ip

This commit is contained in:
makefu 2019-09-25 15:41:44 +02:00
parent aa2d20b279
commit e7d306d0c2
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,20 +1,23 @@
{ }:
{ services.sickbeard = let
{ pkgs, config, ... }:
let
pkg = pkgs.callPackage ./sickgear.nix {};
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
in {
enable = true;
package = pkg;
user = "sickbeard";
group = "download";
port = 8280;
};
services.nginx.virtualHosts."sick.makefu.r" = {
locations."/".proxyPass = http://localhost:8280;
extraConfig = ''
if ( $server_addr = "${external-ip}" ) {
return 403;
services.sickbeard =
{
enable = true;
package = pkg;
user = "sickbeard";
group = "download";
port = 8280;
};
services.nginx.virtualHosts."sick.makefu.r" = {
locations."/".proxyPass = http://localhost:8280;
extraConfig = ''
if ( $server_addr = "${external-ip}" ) {
return 403;
}
'';
};
users.users.sickbeard.extraGroups = [ "nginx" ];
}
'';
};
users.users.sickbeard.extraGroups = [ "nginx" ];
}