lib: add mkCaddyReverseProxy, mkFail2banJail, mkGrafanaAnnotationService, extractArrApiKey
This commit is contained in:
@@ -13,8 +13,8 @@ let
|
||||
# Runs as root (via + prefix) after the NixOS module writes config.json.
|
||||
# Extracts API keys from radarr/sonarr config.xml and injects them via jq.
|
||||
injectApiKeys = pkgs.writeShellScript "recyclarr-inject-api-keys" ''
|
||||
RADARR_KEY=$(${lib.getExe pkgs.gnugrep} -oP '(?<=<ApiKey>)[^<]+' ${radarrConfig})
|
||||
SONARR_KEY=$(${lib.getExe pkgs.gnugrep} -oP '(?<=<ApiKey>)[^<]+' ${sonarrConfig})
|
||||
RADARR_KEY=$(${lib.extractArrApiKey radarrConfig})
|
||||
SONARR_KEY=$(${lib.extractArrApiKey sonarrConfig})
|
||||
${pkgs.jq}/bin/jq \
|
||||
--arg rk "$RADARR_KEY" \
|
||||
--arg sk "$SONARR_KEY" \
|
||||
|
||||
Reference in New Issue
Block a user