nixos/services.prowlarr: remove with lib;
This commit is contained in:
parent
6a73a0aca9
commit
247134aefb
@ -1,7 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.prowlarr;
|
cfg = config.services.prowlarr;
|
||||||
|
|
||||||
@ -9,19 +6,19 @@ in
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
services.prowlarr = {
|
services.prowlarr = {
|
||||||
enable = mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
|
enable = lib.mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
|
||||||
|
|
||||||
package = mkPackageOption pkgs "prowlarr" { };
|
package = lib.mkPackageOption pkgs "prowlarr" { };
|
||||||
|
|
||||||
openFirewall = mkOption {
|
openFirewall = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Open ports in the firewall for the Prowlarr web interface.";
|
description = "Open ports in the firewall for the Prowlarr web interface.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.prowlarr = {
|
systemd.services.prowlarr = {
|
||||||
description = "Prowlarr";
|
description = "Prowlarr";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
@ -37,7 +34,7 @@ in
|
|||||||
environment.HOME = "/var/empty";
|
environment.HOME = "/var/empty";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||||
allowedTCPPorts = [ 9696 ];
|
allowedTCPPorts = [ 9696 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user