1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 15:09:46 +01:00
home-manager/tests/modules/services/lieer/lieer-service-expected.service
Thibaut Marty 6d9d9294d0
notmuch: fix database creation when using hooks
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.
2022-02-11 00:04:40 +01:00

9 lines
318 B
Desktop File

[Service]
Environment=NOTMUCH_CONFIG=/home/hm-user/.config/notmuch/default/config
ExecStart=@gmailieer@/bin/gmi sync
Type=oneshot
WorkingDirectory=/home/hm-user/Mail/hm@example.com
[Unit]
ConditionPathExists=/home/hm-user/Mail/hm@example.com/.gmailieer.json
Description=lieer Gmail synchronization for hm@example.com