From c03df807ff2077121c5c269450a5a083433ded9a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Sep 2021 22:31:41 +0200 Subject: feeds: create notmuch db --- user-profiles/feeds/module.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user-profiles') diff --git a/user-profiles/feeds/module.nix b/user-profiles/feeds/module.nix index aa04cb48..9a0aceba 100644 --- a/user-profiles/feeds/module.nix +++ b/user-profiles/feeds/module.nix @@ -99,8 +99,15 @@ in { # Generated by Home Manager. '' + toIni notmuchIni; - home.activation.createFeedsDatabase = hm.dag.entryAfter ["writeBoundary"] '' + home.activation.createFeedsDatabase = hm.dag.entryAfter ["linkGeneration" "writeBoundary"] '' $DRY_RUN_CMD mkdir -p $VERBOSE_ARG ${databasePath} + if ! [[ -d ${databasePath}/.notmuch ]]; then + NOTMUCH_VERBOSE_ARG="--quiet" + if [[ -v VERBOSE ]]; then + NOTMUCH_VERBOSE_ARG="--verbose" + fi + NOTMUCH_CONFIG=${configPath} $DRY_RUN_CMD ${pkgs.notmuch}/bin/notmuch $NOTMUCH_VERBOSE_ARG new + fi ''; }; } -- cgit v1.2.3