about summary refs log tree commit diff
path: root/modules/piracy/lidarr.nix
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
committerazahi <azat@bahawi.net>2025-02-17 02:21:56 +0300
commit59180328cda59817d71cd58c8f48ead047375064 (patch)
tree2cdd7d1bfa309839ef624c19daf283f510aacf69 /modules/piracy/lidarr.nix
parent2025-02-05 (diff)
2025-02-17
Diffstat (limited to '')
-rw-r--r--modules/piracy/lidarr.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/piracy/lidarr.nix b/modules/piracy/lidarr.nix
index a905d8e..400ba9f 100644
--- a/modules/piracy/lidarr.nix
+++ b/modules/piracy/lidarr.nix
@@ -6,7 +6,6 @@
   this,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.piracy.lidarr;
 
@@ -14,16 +13,16 @@ let
 in
 {
   options.nixfiles.modules.piracy.lidarr = {
-    enable = mkEnableOption "Lidarr";
+    enable = lib.mkEnableOption "Lidarr";
 
-    domain = mkOption {
+    domain = lib.mkOption {
       description = "Domain name sans protocol scheme.";
-      type = with types; str;
+      type = lib.types.str;
       default = "lidarr.${config.networking.domain}";
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     secrets.lidarr-api-key.file = "${inputs.self}/secrets/lidarr-api-key";
 
     ark.directories = [ "/var/lib/lidarr" ];
@@ -74,11 +73,9 @@ in
       ];
     };
 
-    topology = with cfg; {
-      nodes.${this.hostname}.services.lidarr = {
-        info = domain;
-        details.listen.text = "127.0.0.1:${toString port}";
-      };
+    topology.nodes.${this.hostname}.services.lidarr = {
+      info = cfg.domain;
+      details.listen.text = "127.0.0.1:${toString port}";
     };
   };
 }

Consider giving Nix/NixOS a try! <3