···3535 origin = top-right
36363737 # Offset from the origin
3838- offset = 12x28
3838+ offset = 22x28
39394040 # Scale factor. It is auto-detected if value is 0.
4141 scale = 0
···182182 hide_duplicate_count = true
183183184184 # Display indicators for URLs (U) and actions (A).
185185- show_indicators = no
185185+ show_indicators = yes
186186187187 ### Icons ###
188188
+40-9
home/profiles/email/default.nix
···11-{ pkgs, ... }:
11+{ config, pkgs, lib, ... }:
22+with lib;
33+let
44+ safeName = lib.replaceStrings [ "@" ":" "\\" "[" "]" ] [ "-" "-" "-" "" "" ];
55+ imapnotifyAccounts =
66+ filter (a: a.imapnotify.enable) (attrValues config.accounts.email.accounts);
77+ genAccountUnit = account:
88+ let name = safeName account.name;
99+ in
1010+ {
1111+ name = "imapnotify-${name}-mine";
1212+ value = {
1313+ Unit = { Description = "imapnotify for ${name}"; };
1414+1515+ Service = {
1616+ ExecStart = "${pkgs.goimapnotify}/bin/goimapnotify -conf /nix/store/6030i9xdga98l2zyqarrqv5mrjynwm3i-imapnotify-anish-config.json"; # TODO horrible hard coded config location
1717+ Restart = "always";
1818+ RestartSec = 30;
1919+ Type = "simple";
2020+ # this is why we're overriding this stupid thing
2121+ # We need dbus for notify-send on systemd
2222+ Environment = [
2323+ "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"
2424+ "NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/default/config"
2525+ ];
2626+ };
2727+2828+ Install = { WantedBy = [ "default.target" ]; };
2929+ };
3030+ };
2313232+in
333{
434 #age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age";
535 #age.secrets.fastmail.owner = "anish";
···1343 frequency = "*:0/30";
1444 #postExec = "${pkgs.notmuch}/bin/notmuch new";
1545 };
4646+4747+ # call our stupid way of overriding the imapnotify service
4848+ systemd.user.services = listToAttrs (map genAccountUnit [{ name = "anish"; }]);
4949+1650 services.imapnotify.enable = true;
1751 programs.mbsync.enable = true;
1852 programs.msmtp.enable = true;
···2357 image/png; feh %s
2458 image/jpeg; feh %s
2559 '';
6060+2661 programs.neomutt = {
2762 enable = true;
2863 extraConfig = ''
···3166 set editor = "nvim +':set textwidth=0'"
32673368 #set virtual_spoolfile=yes
3434- set folder="~/Mail/anish"
6969+ set folder="~/Maildir/anish"
3570 set mbox_type = Maildir
3636- mailboxes `find ~/Mail/anish/* -maxdepth 0 -type d | grep -v "Trash\|Spam\|tmp\|new\|cur" | sed 's|/home/anish/Mail/anish|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '`
7171+ mailboxes `find ~/Maildir/anish/* -maxdepth 0 -type d | grep -v "Trash\|Spam\|tmp\|new\|cur" | sed 's|/home/anish/Maildir/anish|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '`
37723873 ## Folder with emails
3974 #set folder = "~/Mail/anish"
···269304 extraConfig.local.subFolders = "Verbatim";
270305 };
271306 imapnotify = {
272272- enable = true;
307307+ enable = false;
273308 boxes = [ "Inbox" ];
274309 onNotify = "${pkgs.isync}/bin/mbsync anish && ${pkgs.notmuch}/bin/notmuch index";
275275- onNotifyPost = {
276276- mail = "${pkgs.libnotify}/bin/notify-send -a mail 'email: new in %s'";
277277- #update = "${pkgs.libnotify}/bin/notify-send -a mail 'email: update %s'";
278278- #expunge = "${pkgs.libnotify}/bin/notify-send -a mail 'email: expunge %s'";
279279- };
310310+ onNotifyPost = "${pkgs.libnotify}/bin/notify-send -a mail 'email: new in %s'";
280311 };
281312 msmtp.enable = true;
282313 msmtp.extraConfig = {
+1
home/profiles/email/imapnotify-anish-config.json
···11+{"boxes":["Inbox"],"host":"imap.fastmail.com","onNewMail":"/nix/store/pmvvqwrsyv6ah0x8c82hgkddas5f9ajb-isync-1.4.4/bin/mbsync anish && /nix/store/wyi8a02kk3vh5y7qhdkfzyibb1yl0xc1-notmuch-0.37/bin/notmuch index","onNewMailPost":{"mail":"/nix/store/q360zpybna4djr4kjhjg6hmkk3vj7pjf-libnotify-0.8.1/bin/notify-send -a mail 'email: new in %s'"},"passwordCmd":"'/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin/cat' '/run/agenix/fastmail'","port":993,"tls":true,"username":"anish@lakhwara.com"}