-
Notifications
You must be signed in to change notification settings - Fork 958
Description
I currently see a few workarounds of the form SOPS_AGE_KEY=$(…) sops …
floating around.
I would like to store my age key in my password manager, not have to specify a workaround each invocation as above, not wrap my sops binary in an outer shell script to set SOPS_AGE_KEY
(difficult when sops is provided by various nix flakes via direnv), and not just set SOPS_AGE_KEY
as environment for my entire user session on login.
It seems to me that these and similar usecases would benefit from a new environment variable SOPS_AGE_KEY_EXEC
(bikeshedding welcome) that would contain a command that would be passed to exec.Command
and run without arguments.
The stdout the command produces would then be used as an additional sops identity.
This would allow me to specify SOPS_AGE_KEY_EXEC
globally for my entire user session and have my, securely stored, age key picked up by sops, even in my various direnv
en.