The only way I know of for this is to use something like git-crypt. You can, for example, have a secrets.nix
file that is encrypted in the repo but unencrypted when you do a checkout. This is trivially compatible with Nix Flakes since the file of secrets actually is in plain text on your system.
this post was submitted on 19 Jun 2023
3 points (100.0% liked)
nixos
1262 readers
6 users here now
All about NixOS - https://nixos.org/
founded 4 years ago
Question is whether you want that because that'd likely embed the secret into the .drv files.
What do you need that for?