{ config, lib, pkgs, ... }: with lib; { config = mkIf (!config.home.isolation.active) { accounts.email = { maildirBasePath = "mail"; accounts.local = { address = "alejandro@34project.org"; userName = "alejandro@34project.org"; realName = "Alejandro Soto"; primary = true; # ${maildirBasePath}/${maildir.path} maildir.path = ""; folders.inbox = ""; msmtp.enable = true; neomutt.enable = true; smtp = { host = "smtp.34project.org"; tls = { enable = true; useStartTls = true; }; }; }; }; programs = { msmtp.enable = true; neomutt = { enable = true; vimKeys = true; settings = { record = "+.Sent"; postponed = "+.Drafts"; use_threads = "flat"; index_format = "'%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> %-15.15L (%?l?%4l&%4c?) %s'"; }; }; }; # .dovecot.sieve tiene que ser un symlink tal que el readlink -f de su # dirname (no del symlink en sí) sea la misma cadena que el readlink -f # de ~/sieve. Dovecot verifica eso y tira "Invalid/unknown path to # storage" si este check frágil falla. Ni siquiera # mkOutOfStoreSymlink funciona. Ver código fuente de Dovecot: # pigeonhole/src/lib-sieve/storage/file/sieve-file-storage-active.c home = let sieve = pkgs.runCommandNoCCLocal "sieve" { src = ./sieve; } '' cp -r $src $out chmod -R u+w $out find $out -name '*.sieve' -exec ${pkgs.dovecot_pigeonhole}/bin/sievec -c /dev/null {} \; ''; in { file."sieve".source = sieve; activation.sieve = hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' $DRY_RUN_CMD ln -Tsf ${sieve}/mail.sieve .dovecot.sieve $DRY_RUN_CMD ln -Tsf ${sieve}/mail.svbin .dovecot.svbin ''; }; }; }