about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFelix Buehler2024-08-24 22:05:46 +0200
committerFelix Buehler2024-08-30 23:00:51 +0200
commitcac7b5e2666d4ad88d6ebd4fdbb62859ed44522b (patch)
tree03fd1c5104af660d83f8914958c4b03e40ae68be /nixos
parent2fbd3330750d052b9a8643e4e3567bd5c1e79bee (diff)
nixos/services.jellyseerr: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/jellyseerr.nix20
1 files changed, 9 insertions, 11 deletions
diff --git a/nixos/modules/services/misc/jellyseerr.nix b/nixos/modules/services/misc/jellyseerr.nix
index 9aab517e0493..e09de7aec50b 100644
--- a/nixos/modules/services/misc/jellyseerr.nix
+++ b/nixos/modules/services/misc/jellyseerr.nix
@@ -1,30 +1,28 @@
 { config, pkgs, lib, ... }:
-
-with lib;
 let
   cfg = config.services.jellyseerr;
 in
 {
-  meta.maintainers = [ maintainers.camillemndn ];
+  meta.maintainers = [ lib.maintainers.camillemndn ];
 
   options.services.jellyseerr = {
-    enable = mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
-    package = mkPackageOption pkgs "jellyseerr" { };
+    enable = lib.mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
+    package = lib.mkPackageOption pkgs "jellyseerr" { };
 
-    openFirewall = mkOption {
-      type = types.bool;
+    openFirewall = lib.mkOption {
+      type = lib.types.bool;
       default = false;
       description = ''Open port in the firewall for the Jellyseerr web interface.'';
     };
 
-    port = mkOption {
-      type = types.port;
+    port = lib.mkOption {
+      type = lib.types.port;
       default = 5055;
       description = ''The port which the Jellyseerr web UI should listen to.'';
     };
   };
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     systemd.services.jellyseerr = {
       description = "Jellyseerr, a requests manager for Jellyfin";
       after = [ "network.target" ];
@@ -56,7 +54,7 @@ in
       };
     };
 
-    networking.firewall = mkIf cfg.openFirewall {
+    networking.firewall = lib.mkIf cfg.openFirewall {
       allowedTCPPorts = [ cfg.port ];
     };
   };