update: email and notmuch

This commit is contained in:
2025-10-23 14:06:36 -04:00
parent b2b5943fe6
commit 7dfdf9defd
3 changed files with 35 additions and 161 deletions

View File

@@ -22,7 +22,7 @@
(ring-bell-function 'ignore)
(split-width-threshold 300)
(switch-to-buffer-obey-display-actions t)
(tab-width 4)
(indent-tabs-mode nil)
(treesit-font-lock-level 4)
(truncate-lines t)
(use-dialog-box nil)
@@ -546,35 +546,30 @@
:config
(global-diff-hl-mode))
;; LSP Mode
;; (use-package lsp-mode
;; :ensure t
;; :init
;; (setq lsp-keymap-prefix "C-c l")
;; (defun my/lsp-mode-setup-completion ()
;; (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
;; '(orderless)))
;; :hook ((typescript-ts-mode . lsp)
;; (tsx-ts-mode . lsp)
;; (js-ts-mode . lsp)
;; ;; if you want which-key integration
;; (lsp-mode . lsp-enable-which-key-integration)
;; (lsp-completion-mode . my/lsp-mode-setup-completion))
;; :commands lsp
;; :config
;; (setq lsp-eslint-server-command '("vscode-eslint-language-server" "--stdio"))
;; (lsp-register-client
;; (make-lsp-client
;; :new-connection (lsp-stdio-connection '("tailwindcss-language-server" "--stdio"))
;; :activation-fn (lsp-activate-on "typescriptreact" "typescript" "css" "html")
;; :add-on? t
;; :notification-handlers (ht ("@/tailwindCSS/projectInitialized" #'ignore)
;; ("@/tailwindCSS/projectsDestroyed" #'ignore)))))
;; EMAIL -----------
(use-package notmuch
:ensure t
:bind (("C-c m" . notmuch-hello))
:custom
(notmuch-search-oldest-first nil)
(notmuch-saved-searches
'((:name "inbox" :query "tag:inbox")
(:name "unread" :query "tag:unread")
(:name "sent" :query "tag:sent")
(:name "drafts" :query "tag:draft")))
:config
(setq sendmail-program "msmtp")
(setq notmuch-fcc-dirs nil))
;; (use-package lsp-ui
;; :ensure t
;; :commands lsp-ui-mode
;; :config
;; (setq lsp-ui-sideline-enable nil))
(use-package ol-notmuch
:ensure t
:bind
("C-c l" . org-store-link))
;; EPUBS ----------
(use-package nov
:ensure t
:config
((add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))))
(provide 'init)

View File

@@ -1,91 +1,34 @@
{
pkgs,
osConfig,
lib,
...
osConfig,
lib,
...
}: {
home.packages = with pkgs; [
w3m
inetutils
];
services = {
# mbsync = {
# enable = true;
# frequency = "*-*-* *:*/5:00";
# postExec = "\${pkgs.notmuch} new";
# };
vdirsyncer = {
enable = true;
#frequency = "*-*-* *:*/5:00";
};
};
programs = {
aerc = {
enable = true;
extraConfig = {
ui = {
sort = "-r arrival";
threading-enabled = true;
fuzzy-complete = true;
};
general = {
default-save-path = "~/Downloads";
log-file = "~/.aerc.log";
unsafe-accounts-conf = true;
};
compose = {
address-book-cmd = "notmuch address \"%s\"";
};
filters = {
"text/plain" = "colorize";
"text/calendar" = "calendar";
"text/html" = "html | colorize";
};
};
};
msmtp = {
enable = true;
};
mbsync = {
enable = true;
};
lieer = {
enable = true;
};
vdirsyncer = {
enable = true;
};
khal = {
enable = true;
};
khard = {
enable = true;
};
mu = {
enable = true;
};
afew = {
enable = true;
};
notmuch = {
enable = true;
new.tags = [ "new" ];
hooks = {
postNew = ''
notmuch tag +sent -new tag:new from:michael@michaelthomson.dev
notmuch tag +cal attachment:.ics
notmuch tag +inbox +unread -new "tag:new"
'';
afew --tag --new
'';
preNew = ''
mbsync -a
'';
'';
};
};
};
accounts = {
email = {
accounts.personal = {
primary = true;
@@ -93,9 +36,6 @@
realName = "Michael Thomson";
userName = "michael@michaelthomson.dev";
passwordCommand = "rbw get --folder email michael@michaelthomson.dev";
aerc = {
enable = true;
};
mbsync = {
enable = true;
create = "both";
@@ -121,67 +61,6 @@
notmuch = {
enable = true;
};
mu = {
enable = true;
};
};
};
calendar = {
basePath = ".calendar";
accounts.personal = {
primary = true;
primaryCollection = "personal";
remote = {
type = "caldav";
url = "https://nextcloud.michaelthomson.dev/remote.php/dav";
userName = "michael@michaelthomson.dev";
passwordCommand = [
"rbw"
"get"
"nextcloud.michaelthomson.dev"
];
};
vdirsyncer = {
enable = true;
auth = "basic";
collections = ["personal"];
};
khal = {
enable = true;
type = "calendar";
};
};
};
contact = {
basePath = ".contacts";
accounts.personal = {
local = {
type = "filesystem";
fileExt = ".vcf";
};
remote = {
type = "carddav";
url = "https://nextcloud.michaelthomson.dev/remote.php/dav";
userName = "michael@michaelthomson.dev";
passwordCommand = [
"rbw"
"get"
"nextcloud.michaelthomson.dev"
];
};
vdirsyncer = {
enable = true;
auth = "basic";
collections = ["contacts"];
};
khal = {
enable = true;
collections = ["contacts"];
};
khard = {
enable = true;
defaultCollection = "contacts";
};
};
};
};