summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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" ];
- }