aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--tw/home/cern.scm11
m---------tw/home/files/neomutt0
-rw-r--r--tw/home/lap.scm11
-rw-r--r--tw/packages/mail.scm31
5 files changed, 37 insertions, 19 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index fa1068b8..00000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "neomutt"]
- path = tw/home/files/neomutt
- url = https://github.com/neomutt/neomutt
diff --git a/tw/home/cern.scm b/tw/home/cern.scm
index e6ceffb0..8f446e3b 100644
--- a/tw/home/cern.scm
+++ b/tw/home/cern.scm
@@ -23,6 +23,7 @@
#:use-module (tw packages alice)
#:use-module (tw packages ci)
#:use-module (tw packages catppuccin)
+ #:use-module (tw packages mail)
#:use-module (tw packages xorg)
#:use-module (tw gexp)
#:use-module (tw services desktop)
@@ -33,7 +34,7 @@
(use-package-modules calendar dav mail web-browsers xdisorg xorg)
(define pim-packages
- (list vdirsyncer khal khard aerc lynx)) ; lynx for HTML mail
+ (list vdirsyncer khal khard aerc lynx mutt_oauth2.py)) ; lynx for HTML mail
(define pim-services
(list
@@ -42,13 +43,7 @@
("aerc/aerc.conf" ,(local-file "files/aerc/aerc.conf"))
("aerc/binds.conf" ,(local-file "files/aerc/binds.conf"))
("aerc/filters" ,(local-file "files/aerc/filters" #:recursive? #t))
- ("aerc/stylesets" ,(local-file "files/aerc/stylesets" #:recursive? #t))))
-
- (simple-service 'mail-files home-files-service-type
- `(;; The file from git main is newer than the one bundled with the
- ;; packaged neomutt version and contains a few fixes.
- (".local/bin/mutt_oauth2.py"
- ,(local-file "files/neomutt/contrib/oauth2/mutt_oauth2.py" #:recursive? #t))))))
+ ("aerc/stylesets" ,(local-file "files/aerc/stylesets" #:recursive? #t))))))
(define-public %cern-home
(home-environment
diff --git a/tw/home/files/neomutt b/tw/home/files/neomutt
deleted file mode 160000
-Subproject 34816020295ace8f4b94a4da4c89367354457f4
diff --git a/tw/home/lap.scm b/tw/home/lap.scm
index 9b79fb68..4f68ecd6 100644
--- a/tw/home/lap.scm
+++ b/tw/home/lap.scm
@@ -35,15 +35,16 @@
#:use-module ((tw packages games) ; (nongnu packages steam-client)
#:select (steam-nvidia))
#:use-module (tw home)
+ #:use-module (tw packages mail)
+ #:use-module (tw packages scanner)
#:use-module (tw services desktop)
#:use-module (tw services git)
#:use-module (tw services gnupg)
- #:use-module (tw packages scanner)
#:use-module (tw services restic)
#:use-module (tw theme))
(define pim-packages
- (list newsboat vdirsyncer khal khard aerc lynx)) ; lynx for HTML mail
+ (list newsboat vdirsyncer khal khard aerc lynx mutt_oauth2.py)) ; lynx for HTML mail
(define pim-services
(list
@@ -67,12 +68,6 @@
#~(job "0,30 * * * *" ; every half hour
(string-append #$(file-append vdirsyncer "/bin/vdirsyncer") " sync"))))
- (simple-service 'mail-files home-files-service-type
- `(;; The file from git main is newer than the one bundled with the
- ;; packaged neomutt version and contains a few fixes.
- (".local/bin/mutt_oauth2.py"
- ,(local-file "files/neomutt/contrib/oauth2/mutt_oauth2.py" #:recursive? #t))))
-
(service home-msmtp-service-type
(home-msmtp-configuration
(defaults (msmtp-configuration
diff --git a/tw/packages/mail.scm b/tw/packages/mail.scm
new file mode 100644
index 00000000..b45cabf7
--- /dev/null
+++ b/tw/packages/mail.scm
@@ -0,0 +1,31 @@
+(define-module (tw packages mail)
+ #:use-module (gnu packages mail)
+ #:use-module (gnu packages python)
+ #:use-module (guix build-system copy)
+ #:use-module (guix git-download)
+ #:use-module (guix packages))
+
+(define-public mutt_oauth2.py
+ (package
+ (name "mutt_oauth2.py")
+ (version "20231103")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/neomutt/neomutt")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1z0c19nppf2bjzc5xxhx5ahms449cr1ycww2lq1qqx6f120xixgp"))))
+ (inputs (list python)) ; It's a Python script!
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("contrib/oauth2/mutt_oauth2.py" "bin/"))))
+ (home-page (package-home-page neomutt))
+ (synopsis "OAuth2 authentication script from NeoMutt")
+ (description "Microsoft Exchange Online mail accounts require XOAUTH2
+login. This can be done with the @code{mutt_oauth2.py} script packaged with
+NeoMutt, but the version of the script in Guix' NeoMutt package is too old, so
+this package includes the latest script only.")
+ (license (package-license neomutt))))