about summary refs log tree commit diff
path: root/modules/sonarr.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sonarr.nix')
-rw-r--r--modules/sonarr.nix40
1 files changed, 0 insertions, 40 deletions
diff --git a/modules/sonarr.nix b/modules/sonarr.nix
deleted file mode 100644
index b11dda0..0000000
--- a/modules/sonarr.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-  config,
-  lib,
-  libNginx,
-  ...
-}:
-with lib;
-let
-  cfg = config.nixfiles.modules.sonarr;
-in
-{
-  options.nixfiles.modules.sonarr = {
-    enable = mkEnableOption "Sonarr";
-
-    domain = mkOption {
-      description = "Domain name sans protocol scheme.";
-      type = with types; str;
-      default = "sonarr.${config.networking.domain}";
-    };
-  };
-
-  config = mkIf cfg.enable {
-    ark.directories = [ "/var/lib/sonarr" ];
-
-    nixfiles.modules.nginx = {
-      enable = true;
-      upstreams.sonarr.servers."127.0.0.1:8989" = { };
-      virtualHosts.${cfg.domain} = {
-        locations."/".proxyPass = "http://sonarr";
-        extraConfig = libNginx.config.internalOnly;
-      };
-    };
-
-    services.sonarr = {
-      enable = true;
-      user = "rtorrent";
-      group = "rtorrent";
-    };
-  };
-}

Consider giving Nix/NixOS a try! <3