secrets: fix sorting in setup-secrets

Now the bash globbing sort order equals the nix sort order
(order of `processedFiles`)
Previously, `comm` could fail with error `unsorted` on
specific secrets names.
This commit is contained in:
Erik Arvstedt
2022-07-22 11:26:05 +02:00
parent 0d58dadf0a
commit 0ba6c63670

View File

@@ -173,6 +173,10 @@ in {
RemainAfterExit = true;
};
script = ''
# Use the same sort order for globbing and sorting as in Nix attrsets.
# Required for `comm` below.
export LC_COLLATE=C
${optionalString cfg.generateSecrets ''
mkdir -p "${cfg.secretsDir}"
cd "${cfg.secretsDir}"