From 9bb7a057de6ac772966d0b5e6c8d341d41e8e04f Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 15 Apr 2023 18:28:54 +0200 Subject: Fix(hm/conf/neomutt): Only update imap, when starting neomutt --- home-manager/config/mbsync/default.nix | 9 ++++++++- home-manager/config/neomutt/default.nix | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'home-manager/config') diff --git a/home-manager/config/mbsync/default.nix b/home-manager/config/mbsync/default.nix index c6851e21..f0b5e9f5 100644 --- a/home-manager/config/mbsync/default.nix +++ b/home-manager/config/mbsync/default.nix @@ -1,11 +1,18 @@ -{...}: { +{ + config, + lib, + ... +}: { # TODO I have no clue if both are needed, but it looks neat, right? programs.mbsync = { enable = true; }; services.mbsync = { enable = true; + configFile = "${config.xdg.configHome}/mbsync/mbsync.conf"; }; + # Disable the timer, and only activate it on neomutt start + systemd.user.timers.mbsync = lib.mkForce {}; } # vim: ts=2 diff --git a/home-manager/config/neomutt/default.nix b/home-manager/config/neomutt/default.nix index 8b6fdc6d..c87d63ec 100644 --- a/home-manager/config/neomutt/default.nix +++ b/home-manager/config/neomutt/default.nix @@ -1,6 +1,10 @@ -{...}: { +{pkgs, ...}: { programs.neomutt = { enable = true; + package = pkgs.writeShellScriptBin "neomutt" '' + systemctl --user start mbsync.service; + ${pkgs.neomutt}; + ''; vimKeys = true; checkStatsInterval = 60; binds = [ -- cgit 1.4.1