healthchecks: remove manual secrets creation in local_settings.py (#580589)

This commit is contained in:
Paul Haerle
2026-10-29 20:21:59 +00:00
committed by GitHub
2 changed files with 2 additions and 26 deletions

View File

@@ -683,3 +683,5 @@ The above example can be migrated via the following structured code block:
If your environment requires strict reverse path filtering, you must now explicitly configure it with `networking.firewall.checkReversePath = "strict";`.
- `services.photoprism` installations that are upgrading to version `260919-28c46a116` or later are advised to [migrate their library](https://docs.photoprism.app/user-guide/ai/face-recognition/#upgrading-an-existing-library) to take advantage of the newer face detection and embedding models. This can be done by using the `photoprism-manage` script.
- `healthchecks` now natively supports `*_FILE` options for all secrets, and the prior package experienced breakage related to its manual handling of these secret files, so the manual process was removed and users will need to configure out-of-store secrets through conventional means (e.g. sops, agenix, etc.)

View File

@@ -45,36 +45,10 @@ py.pkgs.buildPythonApplication rec {
whitenoise
];
secrets = [
"DB_PASSWORD"
"DISCORD_CLIENT_SECRET"
"EMAIL_HOST_PASSWORD"
"LINENOTIFY_CLIENT_SECRET"
"MATRIX_ACCESS_TOKEN"
"PD_APP_ID"
"PUSHBULLET_CLIENT_SECRET"
"PUSHOVER_API_TOKEN"
"S3_SECRET_KEY"
"SECRET_KEY"
"SLACK_CLIENT_SECRET"
"TELEGRAM_TOKEN"
"TRELLO_APP_KEY"
"TWILIO_AUTH"
];
localSettings = writeText "local_settings.py" ''
import os
STATIC_ROOT = os.getenv("STATIC_ROOT")
${lib.concatLines (
map (secret: ''
${secret}_FILE = os.getenv("${secret}_FILE")
if ${secret}_FILE:
with open(${secret}_FILE, "r") as file:
${secret} = file.readline()
'') secrets
)}
'';
installPhase = ''