fork/home-manager
git clone https://git.julia.blue/fork/home-manager
bec87d53
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5{ 6config = { 7test . asserts . assertions . expected = [ '' 8Only the ui section of $XDG_CONFIG_HOME/aerc.conf supports contextual (per-account) configuration. 9Please configure it with accounts.email.accounts._.aerc.extraConfig.ui and move any other 10configuration to programs.aerc.extraConfig. 11'' ]; 12test . asserts . warnings . expected = [ '' 13aerc: `programs.aerc.enable` is set, but `...extraConfig.general.unsafe-accounts-conf` is set to false or unset. 14This will prevent aerc from starting; see `unsafe-accounts-conf` in the man page aerc-config(5): 15> By default, the file permissions of accounts.conf must be restrictive and only allow reading by the file owner (0600). 16> Set this option to true to ignore this permission check. Use this with care as it may expose your credentials. 17These permissions are not possible with home-manager, since the generated file is in the nix-store (permissions 0444). 18Therefore, please set `programs.aerc.extraConfig.general.unsafe-accounts-conf = true`. 19This option is safe; if `passwordCommand` is properly set, no credentials will be written to the nix store. 20'' ]; 21 22test . stubs . aerc = { }; 23 24programs . aerc = { 25enable = true ; 26extraAccounts = { 27Test1 = { 28source = "maildir:///dev/null" ; 29enable-folders-sort = true ; 30folders = [ "INBOX" "SENT" "JUNK" ]; 31}; 32}; 33extraConfig . general = { 34# unsafe-accounts-conf = true; 35pgp-provider = "gpg" ; 36}; 37}; 38 39accounts . . accounts . Test2 = { 40address = "addr@mail.invalid" ; 41userName = "addr@mail.invalid" ; 42realName = "Foo Bar" ; 43primary = true ; 44imap . host = "imap.host.invalid" ; 45passwordCommand = "echo PaSsWorD!" ; 46aerc = { 47enable = true ; 48extraConfig . general . pgp-provider = "internal" ; 49}; 50}; 51}; 52}