diff options
author | Felix Buehler | 2024-08-24 22:05:51 +0200 |
---|---|---|
committer | Felix Buehler | 2024-08-30 23:00:54 +0200 |
commit | a99bf845302c6d2f28314dc25e8ceeeb3724ad2f (patch) | |
tree | 65deb2f458fbe479333a61cbeec96985c1d01f7a /nixos | |
parent | 2da17447da0de7f4d2f05d8635a59d82ecea539e (diff) |
nixos/services.nzbhydra2: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/nzbhydra2.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/nixos/modules/services/misc/nzbhydra2.nix b/nixos/modules/services/misc/nzbhydra2.nix index 8246ea52f978..c71e8a92b727 100644 --- a/nixos/modules/services/misc/nzbhydra2.nix +++ b/nixos/modules/services/misc/nzbhydra2.nix @@ -1,31 +1,28 @@ { config, pkgs, lib, ... }: - -with lib; - let cfg = config.services.nzbhydra2; in { options = { services.nzbhydra2 = { - enable = mkEnableOption "NZBHydra2, Usenet meta search"; + enable = lib.mkEnableOption "NZBHydra2, Usenet meta search"; - dataDir = mkOption { - type = types.str; + dataDir = lib.mkOption { + type = lib.types.str; default = "/var/lib/nzbhydra2"; description = "The directory where NZBHydra2 stores its data files."; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = false; description = "Open ports in the firewall for the NZBHydra2 web interface."; }; - package = mkPackageOption pkgs "nzbhydra2" { }; + package = lib.mkPackageOption pkgs "nzbhydra2" { }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0700 nzbhydra2 nzbhydra2 - -" ]; @@ -60,7 +57,7 @@ in { }; }; - networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts = [ 5076 ]; }; + networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ 5076 ]; }; users.users.nzbhydra2 = { group = "nzbhydra2"; |