ryantm / agenix

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

WIP: feature: Use secret to derive addtional secrets deterministcally #233

Closed shimunn closed 5 months ago

shimunn commented 6 months ago

This PR adds functionality to derive additional secrets for an existing one without the need to encrypt an additional value.

age.secrets = rec {
 regular.file = ./secret.age;
 derived = regular // {
  derive = {
   # will be concatenated with secret and hashed, the hash will then be used as seed for an RNG 
   path = "test"
   # filter to be applied to the RNG
   filter = "A-F0-9";
  };
 };
};

TODO: