From dd04aa823c34d853571359ffe460068f3cfb88fa Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Mon, 30 Sep 2024 10:38:01 -0500 Subject: [PATCH] mbsync: Place config file in $XDG_CONFIG_HOME mbsync 1.5.0 supports placing isync's configuration file in $XDG_CONFIG_HOME/isyncrc [1]. [1] https://sourceforge.net/projects/isync/files/isync/1.5.0/ --- modules/programs/mbsync.nix | 2 +- tests/modules/programs/mbsync/mbsync.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/mbsync.nix b/modules/programs/mbsync.nix index 5b1a706a7..8b2998c38 100644 --- a/modules/programs/mbsync.nix +++ b/modules/programs/mbsync.nix @@ -274,7 +274,7 @@ in { programs.notmuch.new.ignore = [ ".uidvalidity" ".mbsyncstate" ]; - home.file.".mbsyncrc".text = let + xdg.configFile."isyncrc".text = let accountsConfig = map genAccountConfig mbsyncAccounts; # Only generate this kind of Group configuration if there are ANY accounts # that do NOT have a per-account groups/channels option(s) specified. diff --git a/tests/modules/programs/mbsync/mbsync.nix b/tests/modules/programs/mbsync/mbsync.nix index 3ad7139c0..28e660df3 100644 --- a/tests/modules/programs/mbsync/mbsync.nix +++ b/tests/modules/programs/mbsync/mbsync.nix @@ -79,8 +79,8 @@ with lib; test.stubs.isync = { }; nmt.script = '' - assertFileExists home-files/.mbsyncrc - assertFileContent home-files/.mbsyncrc ${./mbsync-expected.conf} + assertFileExists home-files/.config/isyncrc + assertFileContent home-files/.config/isyncrc ${./mbsync-expected.conf} ''; }; }