dustinlyons / nixos-config

General purpose Nix configuration for macOS / NixOS with starter templates + step-by-step guides ✨
BSD 3-Clause "New" or "Revised" License
1.78k stars 113 forks source link

Encrypted secrets folder #116

Open diogox opened 1 month ago

diogox commented 1 month ago

Any way to have an encrypted secrets folder instead of having it in a remote repo?

I'd like to have the config be self contained, encrypted ssh keys included and all 🙏

dustinlyons commented 1 month ago

@diogox If you want to do this, I would look into removing the nix-secrets input and rely instead on agenix directly. nix-secrets is just creating and managing what is essentially the config file for running agenix commands. You'll run agenix commands when you want to create or edit a secret.

What steps to take?

Note, these "secrets" end up being files in the Nix Store, and a symlink is created at the path you specify.

More information on agenix:

https://github.com/ryantm/agenix?tab=readme-ov-file#installation