From 3e2116f153077186556c01ae1fc89923abfea265 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 14 Nov 2026 03:45:10 +0000 Subject: populate: passage sources default identities_file when populate runs The default, toString ~/.passage/identities, is a path relative to the home directory, which Nix resolves when parsing the file defining it, populate's Nix library's types, so evaluating any sources failed in pure mode, e.g. in a flake. identities_file defaults to null, which leaves it out of the sources, and populate defaults it to ~/.passage/identities, in HOME, when it runs. The passage scenarios also run without identities_file, with HOME a directory that has .passage/identities. --- pkgs/populate/tests/fixtures.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/populate/tests/fixtures.sh') diff --git a/pkgs/populate/tests/fixtures.sh b/pkgs/populate/tests/fixtures.sh index 85701a1..93b302d 100755 --- a/pkgs/populate/tests/fixtures.sh +++ b/pkgs/populate/tests/fixtures.sh @@ -346,6 +346,10 @@ printf 'secret-a\n' | PASSAGE_DIR=/fixtures/passage/store \ PASSAGE_IDENTITIES_FILE=/fixtures/passage/identities \ passage insert -m x/a >/dev/null +# A home directory with the identities where passage sources look for them +# by default. +mkdir -p /fixtures/passage-home/.passage +cp /fixtures/passage/identities /fixtures/passage-home/.passage/identities # pipe: a command for the pipe source type. cat > /fixtures/pipe <<'SH' -- cgit v1.3.1