2026-01-22 10:43:41 +00:00
|
|
|
#prowlarr.nix
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
{
|
|
|
|
|
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
|
|
|
|
|
2026-05-16 12:27:19 +01:00
|
|
|
# Disable built-in auth — Authelia handles it at the reverse proxy
|
|
|
|
|
systemd.services.prowlarr.preStart = lib.mkAfter ''
|
|
|
|
|
config_file="/var/lib/prowlarr/config.xml"
|
|
|
|
|
if [ -f "$config_file" ]; then
|
|
|
|
|
sed -i 's|<AuthenticationMethod>.*</AuthenticationMethod>|<AuthenticationMethod>None</AuthenticationMethod>|' "$config_file"
|
2026-05-16 21:01:11 +01:00
|
|
|
if grep -q '<AuthenticationRequired>' "$config_file"; then
|
|
|
|
|
sed -i 's|<AuthenticationRequired>.*</AuthenticationRequired>|<AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>|' "$config_file"
|
|
|
|
|
else
|
|
|
|
|
sed -i 's|</Config>| <AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>\n</Config>|' "$config_file"
|
|
|
|
|
fi
|
2026-05-16 12:27:19 +01:00
|
|
|
fi
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Prowlarr
|
2026-01-22 10:43:41 +00:00
|
|
|
services.prowlarr = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
dataDir = "/var/lib/prowlarr";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|