Skyler Grey | 8753c52 | 2022-09-02 00:04:02 +0100 | [diff] [blame] | 1 | { |
| 2 | pkgs, |
| 3 | config, |
| 4 | username, |
| 5 | home-manager-unstable, |
| 6 | home, |
| 7 | ... |
| 8 | }: { |
| 9 | home = { |
| 10 | imports = ["${home-manager-unstable}/modules/programs/aerc.nix"]; |
| 11 | accounts.email = { |
| 12 | maildirBasePath = "Mail"; |
| 13 | accounts = { |
| 14 | collabora = { |
| 15 | astroid = { |
| 16 | enable = true; |
| 17 | sendMailCommand = "${pkgs.msmtp}/bin/msmtpq --read-envelope-from --read-recipients"; |
| 18 | }; |
| 19 | msmtp.enable = true; |
| 20 | aerc = { |
| 21 | enable = true; |
| 22 | extraAccounts = { |
| 23 | source = "notmuch://~/${home.accounts.email.maildirBasePath}/collabora"; |
| 24 | }; |
| 25 | }; |
| 26 | himalaya.enable = true; |
| 27 | neomutt.enable = true; |
| 28 | mbsync = { |
| 29 | enable = true; |
| 30 | create = "maildir"; |
| 31 | }; |
| 32 | notmuch.enable = true; |
| 33 | address = "skyler.grey@collabora.com"; |
| 34 | imap = { |
| 35 | host = "mail.collabora.com"; |
| 36 | port = 143; |
| 37 | tls.useStartTls = true; |
| 38 | }; |
| 39 | smtp = { |
| 40 | host = "mail.collabora.com"; |
| 41 | port = 587; |
| 42 | tls.useStartTls = true; |
| 43 | }; |
| 44 | userName = "skyler"; |
| 45 | realName = "Skyler Grey"; |
| 46 | primary = true; |
| 47 | signature = { |
| 48 | showSignature = "append"; |
| 49 | text = '' |
| 50 | Miss Skyler Grey |
| 51 | Intern |
| 52 | |
| 53 | Collabora Ltd. |
| 54 | Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK |
| 55 | Registered in England & Wales, no. 5513718''; |
| 56 | }; |
| 57 | passwordCommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets.collaboraPassword.path}"; |
| 58 | }; |
| 59 | }; |
| 60 | }; |
| 61 | programs.astroid.enable = true; |
| 62 | programs.msmtp.enable = true; |
| 63 | services.mbsync = { |
| 64 | enable = true; |
| 65 | postExec = "${pkgs.notmuch}/bin/notmuch new"; |
| 66 | }; |
| 67 | programs.mbsync.enable = true; |
| 68 | programs.himalaya.enable = true; |
| 69 | programs.neomutt = { |
| 70 | enable = true; |
| 71 | sidebar.enable = true; |
| 72 | settings = { |
| 73 | preferred_languages = "en"; |
| 74 | }; |
| 75 | extraConfig = '' |
| 76 | auto_view text/html |
| 77 | ''; |
| 78 | }; |
| 79 | programs.notmuch.enable = true; |
| 80 | programs.aerc = { |
| 81 | enable = true; |
| 82 | extraConfig.general.unsafe-accounts-conf = true; |
| 83 | }; |
| 84 | home.packages = with pkgs; [lynx]; |
| 85 | home.file.".mailcap".text = '' |
| 86 | text/html; ${pkgs.lynx}/bin/lynx -force_html -dump %s; copiousoutput |
| 87 | image/*; ${pkgs.kitty}/bin/kitty +kitten icat && read -r -n1 key |
| 88 | ''; |
| 89 | home.shellAliases = { |
| 90 | mutt = "${pkgs.neomutt}/bin/neomutt"; |
| 91 | }; |
| 92 | }; |
| 93 | config = { |
| 94 | sops.secrets.collaboraPassword = { |
| 95 | mode = "0400"; |
| 96 | owner = config.users.users.${username}.name; |
| 97 | group = config.users.users.nobody.group; |
| 98 | }; |
| 99 | environment.persistence."/nix/persist".users.${username}.directories = ["Mail"]; |
| 100 | }; |
| 101 | } |