From 615b5fc1f10e2e09ea71adc01eff5d286d9477e6 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 28 Jul 2024 23:28:33 +0200 Subject: [PATCH] SimpleSAMLPHP/MediaWiki: Update deprecated --replace --- .../services/idp-simplesamlphp/default.nix | 20 +++++++++---------- .../bekkalokk/services/mediawiki/default.nix | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hosts/bekkalokk/services/idp-simplesamlphp/default.nix b/hosts/bekkalokk/services/idp-simplesamlphp/default.nix index 99ae3f2..f0b3924 100644 --- a/hosts/bekkalokk/services/idp-simplesamlphp/default.nix +++ b/hosts/bekkalokk/services/idp-simplesamlphp/default.nix @@ -84,16 +84,16 @@ let cp ${./config.php} "$out" substituteInPlace "$out" \ - --replace '$SAML_COOKIE_SECURE' 'true' \ - --replace '$SAML_COOKIE_SALT' 'file_get_contents("${config.sops.secrets."idp/cookie_salt".path}")' \ - --replace '$SAML_ADMIN_NAME' '"Drift"' \ - --replace '$SAML_ADMIN_EMAIL' '"drift@pvv.ntnu.no"' \ - --replace '$SAML_ADMIN_PASSWORD' 'file_get_contents("${config.sops.secrets."idp/admin_password".path}")' \ - --replace '$SAML_TRUSTED_DOMAINS' 'array( "idp.pvv.ntnu.no" )' \ - --replace '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=idp"' \ - --replace '$SAML_DATABASE_USERNAME' '"idp"' \ - --replace '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."idp/postgres_password".path}")' \ - --replace '$CACHE_DIRECTORY' '/var/cache/idp' + --replace-warn '$SAML_COOKIE_SECURE' 'true' \ + --replace-warn '$SAML_COOKIE_SALT' 'file_get_contents("${config.sops.secrets."idp/cookie_salt".path}")' \ + --replace-warn '$SAML_ADMIN_NAME' '"Drift"' \ + --replace-warn '$SAML_ADMIN_EMAIL' '"drift@pvv.ntnu.no"' \ + --replace-warn '$SAML_ADMIN_PASSWORD' 'file_get_contents("${config.sops.secrets."idp/admin_password".path}")' \ + --replace-warn '$SAML_TRUSTED_DOMAINS' 'array( "idp.pvv.ntnu.no" )' \ + --replace-warn '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=idp"' \ + --replace-warn '$SAML_DATABASE_USERNAME' '"idp"' \ + --replace-warn '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."idp/postgres_password".path}")' \ + --replace-warn '$CACHE_DIRECTORY' '/var/cache/idp' ''; "modules/authpwauth/src/Auth/Source/PwAuth.php" = ./authpwauth.php; diff --git a/hosts/bekkalokk/services/mediawiki/default.nix b/hosts/bekkalokk/services/mediawiki/default.nix index 941f9f6..61cb6bc 100644 --- a/hosts/bekkalokk/services/mediawiki/default.nix +++ b/hosts/bekkalokk/services/mediawiki/default.nix @@ -17,16 +17,16 @@ cp ${./simplesaml-config.php} "$out" substituteInPlace "$out" \ - --replace '$SAML_COOKIE_SECURE' 'true' \ - --replace '$SAML_COOKIE_SALT' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/cookie_salt".path}")' \ - --replace '$SAML_ADMIN_NAME' '"Drift"' \ - --replace '$SAML_ADMIN_EMAIL' '"drift@pvv.ntnu.no"' \ - --replace '$SAML_ADMIN_PASSWORD' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/admin_password".path}")' \ - --replace '$SAML_TRUSTED_DOMAINS' 'array( "wiki.pvv.ntnu.no" )' \ - --replace '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=mediawiki_simplesamlphp"' \ - --replace '$SAML_DATABASE_USERNAME' '"mediawiki_simplesamlphp"' \ - --replace '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/postgres_password".path}")' \ - --replace '$CACHE_DIRECTORY' '/var/cache/mediawiki/idp' + --replace-warn '$SAML_COOKIE_SECURE' 'true' \ + --replace-warn '$SAML_COOKIE_SALT' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/cookie_salt".path}")' \ + --replace-warn '$SAML_ADMIN_NAME' '"Drift"' \ + --replace-warn '$SAML_ADMIN_EMAIL' '"drift@pvv.ntnu.no"' \ + --replace-warn '$SAML_ADMIN_PASSWORD' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/admin_password".path}")' \ + --replace-warn '$SAML_TRUSTED_DOMAINS' 'array( "wiki.pvv.ntnu.no" )' \ + --replace-warn '$SAML_DATABASE_DSN' '"pgsql:host=postgres.pvv.ntnu.no;port=5432;dbname=mediawiki_simplesamlphp"' \ + --replace-warn '$SAML_DATABASE_USERNAME' '"mediawiki_simplesamlphp"' \ + --replace-warn '$SAML_DATABASE_PASSWORD' 'file_get_contents("${config.sops.secrets."mediawiki/simplesamlphp/postgres_password".path}")' \ + --replace-warn '$CACHE_DIRECTORY' '/var/cache/mediawiki/idp' ''; }; };