added prowlarr
This commit is contained in:
1 parent
a4aa3da89e
commit
63d8298e17
2 files changed
+44
No files matched your search
@@ -7,5 +7,6 @@
|
||||
./ai-services.nix
|
||||
./jellyfin.nix
|
||||
./admin.nix
|
||||
./prowlarr.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.prowlarr;
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.prowlarr = {
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/var/lib/prowlarr";
|
||||
description = "data directory for prowlarr";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 9096;
|
||||
description = "Port for prowlarr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.prowlarr = {
|
||||
description = "Prowlarr";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
DynamicUser = true;
|
||||
StateDirectory = "prowlarr";
|
||||
ExecStart = "${lib.getExe cfg.package} -nobrowser -data=${cfg.dataDir}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
environment.HOME = "/var/empty";
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user