samhh / dotfiles

Configuring the universe with Nix.
51 stars 2 forks source link

Can't edit agenix secrets #360

Closed samhh closed 1 year ago

samhh commented 2 years ago

Even right after creating them. Possible I'm not understanding the workflow.

samhh commented 1 year ago

Got it!

For some reason agenix is defaulting to my user's SSH key. A distraction there is a lack of support for SSH agent, causing it to ask for my key's password n times: https://github.com/ryantm/agenix/issues/4#issuecomment-748372771

But the real issue is said defaulting to my user's key. It needs to be pointed to a key in age.identityPaths!

The following works on Alakazam and probably Tentacool as well:

# agenix -e my-secret.age -i /etc/ssh/ssh_host_ed25519_key

Whilst running as root causes it to look somewhere else, it still doesn't look at that path for some reason, despite it I think indirectly being the default.

May be worth removing that explicit age.identityPaths config and seeing what happens. If I'm ever curious.