summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2019-09-25 15:41:44 +0200
committermakefu <github@syntax-fehler.de>2019-09-25 15:41:44 +0200
commite7d306d0c2f650827412ba545922a76ce8d24f10 (patch)
tree26734f9fabfb7da039a31804e03d27092740d09f /makefu/2configs
parentaa2d20b27926cd160b5512d0e6f59725c56aef98 (diff)
ma sickbeard: use correct external ip
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/sickbeard/default.nix37
1 files changed, 20 insertions, 17 deletions
diff --git a/makefu/2configs/sickbeard/default.nix b/makefu/2configs/sickbeard/default.nix
index 629558b89..49e65f091 100644
--- a/makefu/2configs/sickbeard/default.nix
+++ b/makefu/2configs/sickbeard/default.nix
@@ -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" ];
- }