mirror of
https://github.com/nix-community/home-manager.git
synced 2026-11-01 01:30:31 +00:00
Usernames containing special characters like '@' were included verbatim in IMAP/SMTP URLs, producing invalid URIs. Apply 'lib.strings.escapeURL' to the username so that these characters are properly encoded.
33 lines
762 B
Nix
33 lines
762 B
Nix
{ config, pkgs, ... }:
|
|
{
|
|
config = {
|
|
nmt.script =
|
|
let
|
|
dir =
|
|
if (pkgs.stdenv.isDarwin && !config.xdg.enable) then
|
|
"home-files/Library/Preferences/aerc"
|
|
else
|
|
"home-files/.config/aerc";
|
|
in
|
|
''
|
|
assertFileContent ${dir}/accounts.conf ${./encode-url.expected}
|
|
'';
|
|
programs.aerc = {
|
|
enable = true;
|
|
extraConfig.general.unsafe-accounts-conf = true;
|
|
};
|
|
|
|
accounts.email.accounts = {
|
|
basic = {
|
|
realName = "Foo Bar";
|
|
userName = "user@example.com";
|
|
address = "user@example.com";
|
|
primary = true;
|
|
aerc.enable = true;
|
|
imap.host = "imap.example.com";
|
|
smtp.host = "smtp.example.com";
|
|
};
|
|
};
|
|
};
|
|
}
|