-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generator.dependencies
as a list feels awkward in some cases
#69
Comments
You're right, using a list wasn't the best idea. I don't know if it is worthwhile to change this now without breaking anything that already exists. For the medium term I'm rooting for a design like NixOS/nixpkgs#370444 which would provide a way to define generators upstream in nixos and deprecate our age-specific interface. If you still want to have a go at it, feel free! If you end up with something that is compatible with current configurations we can definitely merge it. |
I don't believe that changing the type from |
What I meant is that currently all existing generators expect a list. If you only want to change the option and not the agenix-rekey/apps/generate.nix Lines 76 to 80 in a1dcdd2
Here, the |
That's technically true but thinking about the bigger picture, a script that expects |
Closed by #71 |
When
generator.script
usesdeps
in a homogeneous fashion, like in the example, it feels fine, but when I try to generate an environment file where each dep goes to a specific value, it becomes a bit of a burden, handling lists with nix isn't the nicest. I supposelib.zipListsWith
exists.It feels like it should be possible to type
generator.dependencies
withoneOf [listOf secret, attrsOf secret]
, deps would become a list or attrset depending on the input. Heck, we could even have a pre-writtenenv-from-dependencies
script for the simple case.Is this design acceptable? I can try my hand at implementing it, doesn't seem like too much work, but I haven't looked too deep yet.
The text was updated successfully, but these errors were encountered: