rbw/gpg-agent: improve pinentry options#4895
Conversation
|
I tried running all tests, but got an FOD error in Details |
7f4cc3b to
fd8153f
Compare
|
This PR makes the pinentry mess even more uglier. IMHO we should only support flavor strings as If we wanted to support pinentry packages a new option like |
|
I think it's essential to support packages, not just flavors -- for one, I would rather use Rather than have two competing |
|
Switching this to a draft until NixOS/nixpkgs#133542 is merged. |
fd8153f to
7c9b4f4
Compare
|
@fpletz now that the upstream changes have been merged, I updated this PR. |
5513c26 to
4000687
Compare
422648c to
d04ae8c
Compare
|
Thanks! I just added a few minor final comments. You will also have to run the Perhaps this PR could be marked as ready to review? |
d04ae8c to
788fcc3
Compare
788fcc3 to
1d24e19
Compare
|
Urgh, so much back and forth, sorry about that @rycee. Should be good now though. |
modules/programs/rbw.nix
Outdated
| email = "name@example.com"; | ||
| lock_timeout = 300; | ||
| pinentry = "gnome3"; | ||
| pinentry = pkgs.pinentry-gnome; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes but the current version of nixpkgs used by Home-manager uses pinentry-gnome...
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
This is just an example...
This follows upstream's module change [1], which allows setting any package as a pinentry program. [1]: NixOS/nixpkgs#133542
Following some upstream changes [1], it's now possible to use a simplified package type for the option. [1]: NixOS/nixpkgs#133542
1d24e19 to
1ab3cec
Compare
|
Thanks! Merged to master now 🙂 Note, I switched back to pinentry-gnome3 since it seems to be what is in Nixpkgs right now. I'm a bit confused, though, since I'm pretty sure I saw pinentry-gnome for a while. |
| ++ optional (cfg.pinentryFlavor != null) | ||
| "pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry" | ||
| ++ optional (cfg.pinentryPackage != null) | ||
| "pinentry-program ${lib.getExe pinentryPackage}" |
| ++ optional (cfg.pinentryFlavor != null) | ||
| "pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry" | ||
| ++ optional (cfg.pinentryPackage != null) | ||
| "pinentry-program ${lib.getExe pinentryPackage}" |
There was a problem hiding this comment.
I'm late, but this should be:
- "pinentry-program ${lib.getExe pinentryPackage}"
+ - "pinentry-program ${lib.getExe cfg.pinentryPackage}"Getting this error:
┃ error: undefined variable 'pinentryPackage'
┃
┃ at /nix/store/kww2vp5mhnvb0mczv2xll0m5qsrjrw9q-source/modules/services/gpg-agent.nix:251:42:
┃
┃ 250| ++ optional (cfg.pinentryPackage != null)
┃ 251| "pinentry-program ${lib.getExe pinentryPackage}"
┃ | ^
┃ 252| ++ [ cfg.extraConfig ]);|
I don't understand the choice to specify package here rather than binary. My pinentry of choice does not provide it's binary as the default exe, nor is it named pinentry. |
|
@colemickens you can just |
|
I didn't see the removal of Is the required change in home-manager configs as simple as this? # example for `pinentry-curses`
-services.gpg-agent.pinentryFlavor = "curses";
+services.gpg-agent.pinentryPackage = pkgs.pinentry-curses; |
Description
This is mostly a follow-up to #4805.
Checklist
Change is backwards compatible.
Code formatted with
./format.Code tested through
nix-shell --pure tests -A run.allornix develop --ignore-environment .#allusing Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC
@rycee