From 65aed86b54fab5fc99e34b6162b147ba769c236f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Thu, 8 Jan 2026 12:38:01 +0100 Subject: [PATCH] nixos/pocket-id: convert v1 breaking changes from warnings to asserts --- nixos/modules/services/security/pocket-id.nix | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/nixos/modules/services/security/pocket-id.nix b/nixos/modules/services/security/pocket-id.nix index 08e9f32f7a2e..65f9468f7e7e 100644 --- a/nixos/modules/services/security/pocket-id.nix +++ b/nixos/modules/services/security/pocket-id.nix @@ -143,6 +143,29 @@ in }; config = mkIf cfg.enable { + assertions = ( + map + ( + # Converted to assert 2026-01-08 + setting: { + assertion = !(cfg.settings ? "${setting}"); + message = '' + `services.pocket-id.settings.${setting}` is deprecated. + See [v1 migration guide](https://pocket-id.org/docs/setup/major-releases/migrate-v1). + ''; + }) + [ + "PUBLIC_APP_URL" + "PUBLIC_UI_CONFIG_DISABLED" + "CADDY_DISABLED" + "CADDY_PORT" + "BACKEND_PORT" + "POSTGRES_CONNECTION_STRING" + "SQLITE_DB_PATH" + "INTERNAL_BACKEND_URL" + ] + ); + warnings = (concatMap ( @@ -158,26 +181,6 @@ in "LDAP_BIND_PASSWORD" ] ) - ++ (concatMap - ( - # Added 2025-05-27 - setting: - optional (cfg.settings ? "${setting}") '' - `services.pocket-id.settings.${setting}` is deprecated. - See [v1 migration guide](https://pocket-id.org/docs/setup/major-releases/migrate-v1). - '' - ) - [ - "PUBLIC_APP_URL" - "PUBLIC_UI_CONFIG_DISABLED" - "CADDY_DISABLED" - "CADDY_PORT" - "BACKEND_PORT" - "POSTGRES_CONNECTION_STRING" - "SQLITE_DB_PATH" - "INTERNAL_BACKEND_URL" - ] - ) ++ (concatMap ( # Added 2026-01-08