about summary refs log tree commit diff
path: root/modules/nixos/sonarr.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-04-14 02:51:09 +0300
committerAzat Bahawi <azat@bahawi.net>2023-04-14 02:51:09 +0300
commit39ed30937ec29217820583e07ff1f447d08b9898 (patch)
tree96dc9d1a62e320c89510cd910add2ce8fb819850 /modules/nixos/sonarr.nix
parent2023-04-12 (diff)
2023-04-14
Diffstat (limited to 'modules/nixos/sonarr.nix')
-rw-r--r--modules/nixos/sonarr.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/nixos/sonarr.nix b/modules/nixos/sonarr.nix
index 8c79175..5990ff1 100644
--- a/modules/nixos/sonarr.nix
+++ b/modules/nixos/sonarr.nix
@@ -12,7 +12,7 @@ in {
     domain = mkOption {
       description = "Domain name sans protocol scheme.";
       type = with types; str;
-      default = "sonarr.${config.networking.fqdn}";
+      default = "sonarr.${config.networking.domain}";
     };
   };
 
@@ -20,9 +20,16 @@ in {
     nixfiles.modules.nginx = {
       enable = true;
       upstreams.sonarr.servers."127.0.0.1:8989" = {};
-      virtualHosts.${cfg.domain}.locations."/".proxyPass = "http://sonarr";
+      virtualHosts.${cfg.domain} = {
+        locations."/".proxyPass = "http://sonarr";
+        extraConfig = nginxInternalOnly;
+      };
     };
 
-    services.sonarr.enable = true;
+    services.sonarr = {
+      enable = true;
+      user = "rtorrent";
+      group = "rtorrent";
+    };
   };
 }

Consider giving Nix/NixOS a try! <3