When an hook is defined, a side effect was the creation of the
${notmuchIni.database.path}/.notmuch/ directory by home-manager. If
the Xapian database does not exist yet but this .notmuch directory
exists, Notmuch is confused and throws an error when `notmuch new` is
run (while this should create the database the first time).
This commit changes the hooks paths to $XDG_CONFIG_HOME where Notmuch
expects them (see notmuch-config(1)) instead of inside the maildir
database directory.
It also moves the configuration where Notmuch expects it, but the
$NOTMUCH_CONFIG environment variable is kept for backward
compatibility.
Before, loading a module would be guarded by an optional platform
condition. This made it possible to avoid loading and evaluating a
module if it did not support the host platform.
Unfortunately, this made it impossible to share a single configuration
between GNU/Linux and Darwin hosts, which some wish to do.
This removes the conditional load and instead inserts host platform
assertions in the modules that are platform specific.
Fixes#1906
This change makes the services created via the lieer module aware of the notmuch config created by the home-mangager notmuch module (which is stored in a non-standard location).
Without this change all the lieer services created by the lieer module failed for me, as they were unable to find the notmuch config.
Add 'services.lieer', which generates systemd timer and service units
to synchronize a Gmail account with lieer. Per-account configuration
lives in 'accounts.email.accounts.<name>.lieer.sync'.