From 6797f80d0e93b8ccf9e4a3a332b531d3702206c3 Mon Sep 17 00:00:00 2001 From: Ethan Reece Date: Tue, 6 Aug 2024 18:17:28 -0500 Subject: [PATCH] Configure system email integration for git --- .config/rbw/config.json | 1 + .gnupg/common.conf | 1 + .gnupg/gpg-agent.conf | 5 ++++ gitconfig | 2 ++ home-configuration.scm | 56 +++++++++++++++++++++++++++++++++++++++-- 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .config/rbw/config.json create mode 100644 .gnupg/common.conf create mode 100644 .gnupg/gpg-agent.conf diff --git a/.config/rbw/config.json b/.config/rbw/config.json new file mode 100644 index 0000000..ffa7460 --- /dev/null +++ b/.config/rbw/config.json @@ -0,0 +1 @@ +{"email":"vaultwarden@sudoer777.dev","base_url":"https://vault.sudoer777.dev/","identity_url":null,"notifications_url":null,"lock_timeout":3600,"sync_interval":3600,"pinentry":"pinentry","client_cert_path":null} \ No newline at end of file diff --git a/.gnupg/common.conf b/.gnupg/common.conf new file mode 100644 index 0000000..f054b75 --- /dev/null +++ b/.gnupg/common.conf @@ -0,0 +1 @@ +# use-keyboxd diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..1a4e3d0 --- /dev/null +++ b/.gnupg/gpg-agent.conf @@ -0,0 +1,5 @@ +pinentry-program /gnu/store/mglbqwkdyzxqw0gfngmghr7vrkcxwkxa-pinentry-tty-1.2.1/bin/pinentry +default-cache-ttl 600 +max-cache-ttl 7200 +default-cache-ttl-ssh 1800 +max-cache-ttl-ssh 7200 diff --git a/gitconfig b/gitconfig index e0b8335..887d5dc 100644 --- a/gitconfig +++ b/gitconfig @@ -12,3 +12,5 @@ pinentry-mode = loopback [init] defaultBranch = main +[sendemail] + smtpserver = /home/sudoer777/.guix-home/profile/bin/msmtp diff --git a/home-configuration.scm b/home-configuration.scm index 2cc1a91..1631f73 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -10,17 +10,46 @@ (gnu home services guix) (gnu home services gnupg) (gnu home services ssh) + (gnu home services mail) (gnu home services syncthing)) (home-environment (packages (specifications->packages (list "emacs-guix" "emacs-geiser-guile" "emacs-geiser" + "coreutils" + "findutils" + "util-linux" +; "shadow" - conflicts with host distro (needs Shepherd?) + "iputils" + "procps" + "psmisc" + "gzip" + "tar" + "diffutils" + "iproute2" + "ncurses" + "bzip2" + "xz" + "psmisc" + "curl" + "pinentry-tty" + "wget" + "man-db" + "mailutils" + "lsof" + "strace" + "tcpdump" + "file" + "e2fsprogs" "guile" "guix" "speedtest-cli" "emacs" "make" + "password-store" + "pass-otp" + "rbw" "just" "bat" "cups" @@ -45,7 +74,6 @@ "flatpak" "libreoffice" "kitty" -; "gnupg" - conflicts with host distro "dolphin" "keepassxc" "htop" @@ -121,9 +149,33 @@ (local-file ".config/fish/config.fish"))))) (service home-files-service-type `((".emacs.d/init.el" ,(local-file "./.emacs.d/init.el")) - (".gitconfig" ,(local-file "./gitconfig")))) + (".gitconfig" ,(local-file "./gitconfig")) + (".gnupg/common.conf" ,(local-file "./.gnupg/common.conf")))) (service home-xdg-configuration-files-service-type `(("weechat/weechat.conf" ,(local-file "./.config/weechat/weechat.conf")) ("zathura/zathurarc" ,(local-file "./.config/zathura/zathurarc")) + ("rbw/config.json" ,(local-file "./.config/rbw/config.json")) ("guix/channels.scm" ,(local-file "./channels.scm.lock")))) + (service home-gpg-agent-service-type + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-tty "/bin/pinentry")) + (ssh-support? #t))) + (service home-msmtp-service-type + (home-msmtp-configuration + (accounts + (list + (msmtp-account + (name "default") + (configuration + (msmtp-configuration + (host "smtp.fastmail.com") + (port 465) + (auth? #t) + (user "fastmail@ethanreece.com") + (from "guix-home@ethanreece.com") + (tls? #t) + (tls-starttls? #f) + (tls-trust-file "~/.guix-home/profile/etc/ssl/certs/ca-certificates.crt") + (password-eval "pass Mail/fastmail@ethanreece.com")))))))) (service home-symlink-manager-service-type))))