You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use agenix with nixos-container, the issue is that the containers won't have ssh enabled and I would prefer not to have keys for containers.
I tried bind-mounting /run/agenix/path/to/secret, however the secrets disappear from the container when a new agenix generation is created, probably because /run/agenix is a symlink.
I think the best way to solve this would be for age.secrets.<secret>.path to resolve to a different path each time the secrets change. So, for example, it could resolve to /run/agenix.d/<hash derived from secret inputs>/<secret>. This not only solves issues with nixos-containers, but also with reloading systemd services, becuse the paths changes, and both nixos-containers and systemd services will automatically restart when their inputs change.
/run/agenix could still keep working as it currently does.
The text was updated successfully, but these errors were encountered:
How about setting age.identityPaths to something different for the container? Then you could bind mount an identity into the container that it uses to decrypt the secrets?
I'm trying to use agenix with nixos-container, the issue is that the containers won't have ssh enabled and I would prefer not to have keys for containers.
I tried bind-mounting
/run/agenix/path/to/secret
, however the secrets disappear from the container when a new agenix generation is created, probably because/run/agenix
is a symlink.I think the best way to solve this would be for
age.secrets.<secret>.path
to resolve to a different path each time the secrets change. So, for example, it could resolve to/run/agenix.d/<hash derived from secret inputs>/<secret>
. This not only solves issues with nixos-containers, but also with reloading systemd services, becuse the paths changes, and both nixos-containers and systemd services will automatically restart when their inputs change./run/agenix
could still keep working as it currently does.The text was updated successfully, but these errors were encountered: