about summary refs log tree commit diff
path: root/modules/piracy/radarr.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/piracy/radarr.nix')
-rw-r--r--modules/piracy/radarr.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/piracy/radarr.nix b/modules/piracy/radarr.nix
index ac2fe7f..12f8d95 100644
--- a/modules/piracy/radarr.nix
+++ b/modules/piracy/radarr.nix
@@ -6,7 +6,6 @@
   this,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.piracy.radarr;
 
@@ -14,16 +13,16 @@ let
 in
 {
   options.nixfiles.modules.piracy.radarr = {
-    enable = mkEnableOption "Radarr";
+    enable = lib.mkEnableOption "Radarr";
 
-    domain = mkOption {
+    domain = lib.mkOption {
       description = "Domain name sans protocol scheme.";
-      type = with types; str;
+      type = lib.types.str;
       default = "radarr.${config.networking.domain}";
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     secrets.radarr-api-key.file = "${inputs.self}/secrets/radarr-api-key";
 
     ark.directories = [ "/var/lib/radarr" ];
@@ -74,11 +73,9 @@ in
       ];
     };
 
-    topology = with cfg; {
-      nodes.${this.hostname}.services.radarr = {
-        info = domain;
-        details.listen.text = "127.0.0.1:${toString port}";
-      };
+    topology.nodes.${this.hostname}.services.radarr = {
+      info = cfg.domain;
+      details.listen.text = "127.0.0.1:${toString port}";
     };
   };
 }

Consider giving Nix/NixOS a try! <3