about summary refs log tree commit diff
path: root/modules/nixos/lidarr.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/lidarr.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/nixos/lidarr.nix b/modules/nixos/lidarr.nix
index f73f917..8439ec0 100644
--- a/modules/nixos/lidarr.nix
+++ b/modules/nixos/lidarr.nix
@@ -12,7 +12,7 @@ in {
     domain = mkOption {
       description = "Domain name sans protocol scheme.";
       type = with types; str;
-      default = "lidarr.${config.networking.fqdn}";
+      default = "lidarr.${config.networking.domain}";
     };
   };
 
@@ -20,9 +20,16 @@ in {
     nixfiles.modules.nginx = {
       enable = true;
       upstreams.lidarr.servers."127.0.0.1:8686" = {};
-      virtualHosts.${cfg.domain}.locations."/".proxyPass = "http://lidarr";
+      virtualHosts.${cfg.domain} = {
+        locations."/".proxyPass = "http://lidarr";
+        extraConfig = nginxInternalOnly;
+      };
     };
 
-    services.lidarr.enable = true;
+    services.lidarr = {
+      enable = true;
+      user = "rtorrent";
+      group = "rtorrent";
+    };
   };
 }

Consider giving Nix/NixOS a try! <3