fork/home-manager
git clone https://git.julia.blue/fork/home-manager
c59f0eac
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5{ 6imports = [ ../../accounts/email-test-accounts.nix ]; 7 8config = { 9programs . mbsync = { 10enable = true ; 11# programs.mbsync.groups and 12# accounts.email.accounts.<name>.mbsync.groups should NOT be used at the 13# same time. 14# If they are, then the new version will take precedence. 15groups . inboxes = { 16"hm@example.com" = [ "Inbox1" "Inbox2" ]; 17hm-account = [ "Inbox" ]; 18}; 19}; 20 21accounts . . accounts = { 22"hm@example.com" . mbsync = { 23enable = true ; 24extraConfig . account . SSLVersions = [ "TLSv1.3" "TLSv1.2" ]; 25groups . inboxes = { 26channels = { 27inbox1 = { 28farPattern = "Inbox1" ; 29nearPattern = "Inboxes" ; 30}; 31inbox2 = { 32farPattern = "Inbox2" ; 33nearPattern = "Inboxes" ; 34}; 35}; 36}; 37}; 38 39hm-account . mbsync = { 40enable = true ; 41groups . hm-account = { 42channels . earlierPatternMatch = { 43farPattern = "Label" ; 44nearPattern = "SomethingUnderLabel" ; 45patterns = [ 46"ThingUnderLabel" 47"!NotThisMaildirThough" 48''"[Weird] Label?"'' 49]; 50}; 51channels . inbox = { 52farPattern = "Inbox" ; 53nearPattern = "Inbox" ; 54}; 55channels . strangeHostBoxName = { 56farPattern = "[Weird]/Label Mess" ; 57nearPattern = "[AnotherWeird]/Label" ; 58}; 59channels . patternMatch = { 60farPattern = "Label" ; 61nearPattern = "SomethingUnderLabel" ; 62patterns = [ 63"ThingUnderLabel" 64"!NotThisMaildirThough" 65''"[Weird] Label?"'' 66]; 67}; 68}; 69# No group should be printed. 70groups . emptyGroup = { }; 71# Group should be printed, but left with default channels. 72groups . emptyChannels = { 73channels . empty1 = { }; 74channels . empty2 = { }; 75}; 76}; 77}; 78 79test . stubs . isync = { }; 80 81nmt . script = '' 82assertFileExists home-files/.mbsyncrc 83assertFileContent home-files/.mbsyncrc ${ ./mbsync-expected.conf } 84'' ; 85}; 86}