Sequoia PGP on Home Manager

Hello everyone!

I’m looking for a documentation on how to use Sequoia PGP on Home Manager

Do you simply have to add sequoia-sq to home.packages
like home.packages = [ ... sequoia-sq ... ]?

Or is it simply a drop-in replacement of programs.gpg.package
like programs.gpg.package = pkgs.sequoia-sq?
else, would the package be pkgs.sequoia-sqv / pkgs.sequoia-sqop / pkgs.sequoia-chameleon-gnupg ?

Would services.gpg-agent and services.gpg-agent.pinentry both work without tweaks with the above implementation?

Related


poke @doronbehar :slight_smile:

Unfortunately, from what I’m aware of, sequoia hasn’t yet implemented all of the commands required for also replacing gpg-agent and prompting a password etc. using pinentry. So I wouldn’t use it as a drop-in replacement for programs.gpg.package. See:

https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/414

And:

https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/537

If you just want to play with it for manual encryption and decryption, it should be fully functional :).

1 Like

Okay thanks, keeping gpg agent for now then;

But what about

Correct, just like any other package.

1 Like

While that’s true, AIUI the chameleon exists to be a bridge for some of that: sequoia-pgp / sequoia-chameleon-gnupg · GitLab

I haven’t tried it, personally, and there is no simple home-manager module afaik, so you’d have to experiment with setting it up yourself. I doubt it’s fully functional yet.

1 Like

It is documented as being able to bridge the gap indeed!

Imma test it

1 Like

Created

I had a deeper look on this subject today, and I wanted to point out a small misconception the this discussion, the READMEs of these projects, and sequoia-chameleon-gnupg’s in particular might suggest:

The main annoying issue with gpg is its non-intuitive CLI interface, based only upon -- prefixed flags and no hierarchy. gpg-sq is using Sequoia’s Rust libraries internally, and also interacts with $GNUPGHOME and gpg-agent, but you can’t use sq to interact with $GNUPGHOME and gpg-agent. That’s why upstream issues #414 and #537 are still open.

2 Likes

Indeed.

I have tested both nixpkgs recently, and sequoia-sq works great without issues.

sequoia-chameleon-gnupg also works great but only for gpgv-sq, since gpg-sq depends on gpg-agent (from GnuPG) and gpgconf (also from GnuPG) which aren’t stated as hard nor optional dependencies : `sequoia-chameleon-gnupg`: missing dependencies for `gpg-sq` · Issue #473387 · NixOS/nixpkgs · GitHub

Also something very annoying is that git’s gpg.format config option has openpgp as a choice but requires the very GnuPG command interface (in which case git requires sequoia-chameleon-gnupg)

I just created

Including a section for Sequoia, Home Manager, and how to make git work with sequoia

1 Like