Integrating khard and aerc Incus Containers
By chimo on (updated on )This post explains how I currently have khard and aerc running in separate Incus containers, while having aerc being able to lookup contacts via khard. It’s nothing revolutionary, and I’m sure there are better ways, but it’s the first thing I thought of, and it works (spoilers: it’s SSH).
The premise is having two Incus containers (one for khard, one for aerc) which by default cannot talk to each other. I want to be able to have my contacts from khard suggested as I'm typing in the "To" field in aerc.
In a regular environment where aerc and khard are installed on the same system, something similar to what's mentioned in the aerc-config man page should work:
address-book-cmd = khard email --remove-first-line --parsable
%s
My address-book-cmd line looks something like the following
instead:
address-book-cmd = ssh -o StrictHostKeyChecking=no -i
~/.ssh/id_ed25519 aerc@10.118.161.222 -- khard email -a contacts
--parsable --remove-first-line %s
I've automated the user creation, SSH key creation and key copying as part of the scripts that create the containers.