From 21dcb5b50c904ce278cd5ba5d038a2317bd13a36 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 26 Oct 2023 07:00:51 +0100 Subject: [PATCH 1/5] Update firefox managed bookmarks --- system/firefox.nix | 81 +++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/system/firefox.nix b/system/firefox.nix index 6a05a620..c011861e 100644 --- a/system/firefox.nix +++ b/system/firefox.nix @@ -75,16 +75,17 @@ ManagedBookmarks = [ { toplevel_name = "Standard Bookmarks"; } { - name = "Config Repo"; - url = "https://git.xenia.me.uk/xenia/nixos"; - } - { - name = "WhatsApp Web"; - url = "https://web.whatsapp.com/"; - } - { - name = "Discord"; - url = "https://discord.com/app"; + name = "Pins"; + children = [ + { + name = "WhatsApp Web"; + url = "https://web.whatsapp.com/"; + } + { + name = "Discord"; + url = "https://discord.com/app"; + } + ]; } { name = "Server"; @@ -97,22 +98,35 @@ name = "Gitea"; url = "https://git.xenia.me.uk"; } - { - name = "Grafana Dashboard"; - url = "https://status.xenia.me.uk"; - } - { - name = "ntfy.sh"; - url = "https://ntfy.xenia.me.uk"; - } { name = "AdGuard Home"; url = "https://guard.xenia.me.uk"; } + { + name = "Grafana Dashboard"; + url = "https://status.xenia.me.uk"; + } { name = "Traefik"; url = "https://traefik.xenia.me.uk"; } + { + name = "ntfy.sh topics"; + children = [ + { + name = "Emacs"; + url = "https://ntfy.xenia.me.uk/UhrNGphnSKCpCnk8"; + } + { + name = "JET Pulse Notifications"; + url = "https://ntfy.xenia.me.uk/jet_pulse_notifications"; + } + { + name = "MAST-U Pulse Notifications"; + url = "https://ntfy.xenia.me.uk/mast_u_pulse_notifications"; + } + ]; + } ]; } { @@ -133,16 +147,24 @@ ]; } { - name = "Docs"; + name = "Docs and Repos"; children = [ + { + name = "Config"; + url = "https://git.xenia.me.uk/xenia/nixos"; + } + { + name = "Crafted Emacs"; + url = "https://github.com/SystemCrafters/crafted-emacs"; + } + { + name = "Awesome Hyprland"; + url = "https://github.com/hyprland-community/awesome-hyprland"; + } { name = "NixOS and Flakes"; url = "https://nixos-and-flakes.thiscute.world/"; } - { - name = "Crafted Emacs Repo"; - url = "https://github.com/SystemCrafters/crafted-emacs"; - } { name = "Nerd Fonts Cheat Sheet"; url = "https://www.nerdfonts.com/cheat-sheet"; @@ -161,19 +183,6 @@ } ]; } - { - name = "Dev"; - children = [ - { - name = "GitHub"; - url = "https://github.com"; - } - { - name = "GitLab"; - url = "https://gitlab.com"; - } - ]; - } ]; NoDefaultBookmarks = true; OfferToSaveLogins = false; From 658237fd6902913df95a5136a50833a94589e12e Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 26 Oct 2023 12:47:59 +0100 Subject: [PATCH 2/5] Add ntfy to pinned tabs --- system/firefox.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/firefox.nix b/system/firefox.nix index c011861e..037bec63 100644 --- a/system/firefox.nix +++ b/system/firefox.nix @@ -77,6 +77,10 @@ { name = "Pins"; children = [ + { + name = "ntfy.sh"; + url = "https://ntfy.xenia.me.uk/"; + } { name = "WhatsApp Web"; url = "https://web.whatsapp.com/"; From 9f19f3a62658583d06f96aedb0147c60cf79f551 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 26 Oct 2023 13:09:11 +0100 Subject: [PATCH 3/5] Email setting updates Add more tagging rules to afew Change syncing setup to run mbsync less frequently (every 30 mins) but sync inboxes in notmuch pre hook. Imapnotify can now just call notmuch Update conditions to refresh notmuch-indicator (emacs) --- home/accounts/afew/config | 12 +++++++++- home/accounts/email.nix | 28 +++++++++++------------ home/emacs/modules/custom-email-config.el | 6 +++-- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/home/accounts/afew/config b/home/accounts/afew/config index 3539fbff..69b87ab8 100644 --- a/home/accounts/afew/config +++ b/home/accounts/afew/config @@ -9,7 +9,7 @@ sent_tag = sent [FolderNameFilter] folder_explicit_list = Proton/Archive Proton/Sent Proton/Trash iCloud/Archive 'iCloud/Deleted Messages' 'iCloud/Sent Messages' Outlook/Archive Outlook/Trash Outlook/Sent -folder_transforms = Drafts:draft Sent:sent 'Sent Messages':sent Trash:deleted 'Deleted Messages':deleted +folder_transforms = Archive:archive Drafts:draft Sent:sent 'Sent Messages':sent Trash:deleted 'Deleted Messages':deleted folder_lowercases = true maildir_separator = / @@ -23,6 +23,16 @@ message = Untagged inbox from archive query = tag:archive AND tag:inbox tags = -inbox +[Filter.3] +message = Tag ReqCo emails +query = from:reqco@jet.uk +tags = +reqco + +[Filter.4] +message = Tag operations update emails +query = from:no-reply@jet.uk +tags = +operations + [MailMover] folders = Proton/Inbox iCloud/Inbox Outlook/Inbox rename = True diff --git a/home/accounts/email.nix b/home/accounts/email.nix index 8e42bf75..76a3cb4d 100644 --- a/home/accounts/email.nix +++ b/home/accounts/email.nix @@ -16,13 +16,16 @@ enable = true; maildir.synchronizeFlags = true; new.tags = [ "new" ]; - hooks.postNew = '' - if [ $(${pkgs.notmuch}/bin/notmuch count is:new) -gt 0 ]; then - ${pkgs.libnotify}/bin/notify-send "Notmuch Email" "Unread emails in inbox" - fi - ${pkgs.afew}/bin/afew --new --tag - ${pkgs.afew}/bin/afew --move-mail - ''; + hooks = { + preNew = "${pkgs.isync}/bin/mbsync inboxes"; + postNew = '' + if [ $(${pkgs.notmuch}/bin/notmuch count is:new) -gt 0 ]; then + ${pkgs.libnotify}/bin/notify-send "Notmuch Email" "Unread emails in inbox" + fi + ${pkgs.afew}/bin/afew --new --tag + ${pkgs.afew}/bin/afew --move-mail + ''; + }; }; afew = { enable = true; @@ -32,7 +35,7 @@ services = { mbsync = { enable = true; - frequency = "*:0/15"; + frequency = "*:0/30"; postExec = "${pkgs.notmuch}/bin/notmuch new"; }; imapnotify.enable = true; @@ -65,8 +68,7 @@ imapnotify = { enable = lib.mkDefault accountEnabled; boxes = [ "INBOX" ]; - onNotify = "${pkgs.isync}/bin/mbsync proton"; - onNotifyPost = "${pkgs.notmuch}/bin/notmuch new"; + onNotify = "${pkgs.notmuch}/bin/notmuch new"; extraConfig = { wait = 300; tls = false; @@ -105,8 +107,7 @@ imapnotify = { enable = lib.mkDefault accountEnabled; boxes = [ "INBOX" ]; - onNotify = "${pkgs.isync}/bin/mbsync icloud"; - onNotifyPost = "${pkgs.notmuch}/bin/notmuch new"; + onNotify = "${pkgs.notmuch}/bin/notmuch new"; extraConfig.wait = 300; }; mbsync = { @@ -144,8 +145,7 @@ imapnotify = { enable = lib.mkDefault accountEnabled; boxes = [ "INBOX" ]; - onNotify = "${pkgs.isync}/bin/mbsync outlook"; - onNotifyPost = "${pkgs.notmuch}/bin/notmuch new"; + onNotify = "${pkgs.notmuch}/bin/notmuch new"; extraConfig = { wait = 300; tls = false; diff --git a/home/emacs/modules/custom-email-config.el b/home/emacs/modules/custom-email-config.el index a7e64acf..f6b18c37 100644 --- a/home/emacs/modules/custom-email-config.el +++ b/home/emacs/modules/custom-email-config.el @@ -9,8 +9,10 @@ (".*@icloud.com" . "iCloud/Sent") (".*@ukaea.uk" . "Outlook/Sent") (".*@jet.uk" . "Outlook/Sent")) - notmuch-indicator-refresh-count 60 - notmuch-indicator-args '((:terms "tag:unread and tag:inbox" :label "󰮒 "))) + notmuch-indicator-args '((:terms "tag:unread and tag:inbox" :label "󰮒 ")) + notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer + notmuch-refresh-all-buffers + notmuch-poll-and-refresh-this-buffer)) (require 'notmuch) (require 'notmuch-indicator) (notmuch-indicator-mode +1) From 278dff99ed751623c303c7f352a0379390764180 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 26 Oct 2023 13:19:03 +0100 Subject: [PATCH 4/5] Re-enable pictures syncing for Ronin --- hosts/Ronin/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index 46089046..07907fc4 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -17,5 +17,4 @@ ''; systemPackages = with pkgs; [ openfortivpn ]; }; - services.syncthing.settings.folders = { "Pictures".enable = false; }; } From 80ddaf9cfce4fde56279db211ff042294e8c88ee Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 26 Oct 2023 13:30:44 +0100 Subject: [PATCH 5/5] Switch to using git-sync for elfeed and notmuch databases Disable both in syncthing --- home/emacs/default.nix | 16 +++++++++++++--- services/syncthing/default.nix | 12 ------------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/home/emacs/default.nix b/home/emacs/default.nix index b6481170..ee951ff9 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -9,9 +9,19 @@ }; services.git-sync = { enable = true; - repositories.org = { - path = "${config.home.homeDirectory}/Org"; - uri = "git+https://git.xenia.me.uk/xenia/Org.git"; + repositories = with config.home; { + org = { + path = "${homeDirectory}/Org"; + uri = "git+https://git.xenia.me.uk/xenia/Org.git"; + }; + notmuch = { + path = "${homeDirectory}/.notmuch"; + uri = "git+https://git.xenia.me.uk/xenia/notmuch.git"; + }; + elfeed = { + path = "${homeDirectory}/.elfeed"; + uri = "git+https://git.xenia.me.uk/xenia/elfeed.git"; + }; }; }; home = { diff --git a/services/syncthing/default.nix b/services/syncthing/default.nix index 0ffa2312..8d57f062 100644 --- a/services/syncthing/default.nix +++ b/services/syncthing/default.nix @@ -22,18 +22,6 @@ in { "I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK"; }; folders = { - "Elfeed" = { - inherit devices; - id = "hnnxy-lb5af"; - path = "${dataDir}/.elfeed"; - ignorePerms = true; - }; - "Notmuch" = { - inherit devices; - id = "yiaiy-xrnse"; - path = "${dataDir}/.notmuch"; - ignorePerms = true; - }; "Pictures" = { inherit devices; id = "ziuj8-rm6dn";