NIX and Mailmate, and changing YKs

This commit is contained in:
2026-03-30 11:33:32 +02:00
parent 374df2d6ae
commit a054621216

View File

@@ -207,7 +207,19 @@ ssb# ed25519/085A93EB5D85EE54 created: 2026-03-10 expires: 2035-03-08
```
Any time you change the yubikey you use you have to delete (`gpg --delete-key`), refetch the key (`gpg --card-edit fetch`), and set the trust to full (`gpg --edit-key 01B157D574FEDBB2 and then put ultimate trust in the key`)
~~Any time you change the yubikey you use you have to delete (`gpg --delete-key`), refetch the key (`gpg --card-edit fetch`), and set the trust to full (`gpg --edit-key 01B157D574FEDBB2 and then put ultimate trust in the key`).~~
[A direct way](https://github.com/drduh/YubiKey-Guide?tab=readme-ov-file#using-multiple-yubikeys) is:
```
gpg-connect-agent "scd serialno" "learn --force" /bye
```
Finally, in the NIX environment I use for my mac all the GPG tools live in /Users/olaf/.nix-profile/bin. Hence, for mailmate I need to set:
```
defaults write com.freron.MailMate environmentVariables -array '{"enabled" = :true; "name" = "MM_GPG"; "value" = "/Users/olaf/.nix-profile/bin/gpg";}'
```