nixos/nextcloud: Apply secrets after default values of settings (#487319)
This commit is contained in:
@@ -293,9 +293,6 @@ let
|
||||
) "'dbtableprefix' => '${toString c.dbtableprefix}',"}
|
||||
${lib.optionalString (c.dbpassFile != null) "'dbpassword' => nix_read_secret('dbpass'),"}
|
||||
'dbtype' => '${c.dbtype}',
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: credential: "'${name}' => nix_read_secret('${name}'),") cfg.secrets
|
||||
)}
|
||||
${objectstoreConfig}
|
||||
];
|
||||
|
||||
@@ -304,6 +301,12 @@ let
|
||||
"impossible: this should never happen (decoding generated settings file %s failed)"
|
||||
));
|
||||
|
||||
$CONFIG = array_replace_recursive($CONFIG, [
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: credential: "'${name}' => nix_read_secret('${name}'),") cfg.secrets
|
||||
)}
|
||||
]);
|
||||
|
||||
${lib.optionalString (cfg.secretFile != null) ''
|
||||
$CONFIG = array_replace_recursive($CONFIG, nix_read_secret_and_decode_json_file('secret_file'));
|
||||
''}
|
||||
|
||||
Reference in New Issue
Block a user