ryantm / agenix

age-encrypted secrets for NixOS and Home manager
https://matrix.to/#/#agenix:nixos.org
Creative Commons Zero v1.0 Universal
1.54k stars 119 forks source link

Support `--armor` #269

Open fzakaria opened 3 months ago

fzakaria commented 3 months ago

I like commiting non-binary data and age supports --armor to generate a PEM style;e base64 file. I think the secrets.nix file should/could support this as an argument when generate the age secrets.

dlubawy commented 2 months ago

This is certainly doable. I added it in on a dirty branch containing other fixes for my personal use. The commit adds the attribute armor to be set within secrets.nix, and then it checks if the attribute is true/false which determines whether to add --armor to the age bin call.

It should be easy to pull that out into a clean branch that could be merged into main.

fzakaria commented 2 months ago

Contribute it :)