diff --git a/config.yaml b/config.yaml index 0cc3e14..e360968 100644 --- a/config.yaml +++ b/config.yaml @@ -37,14 +37,22 @@ variables: mail: personal: - user: lelgenio - mail: disroot.org + from: Leonardo EugĂȘnio + user: lelgenio@disroot.org + imap: disroot.org + smtp: disroot.org pass: disroot.org work: + from: Leonardo EugĂȘnio user: leonardo@wopus.com.br - mail: wopus.com.br - pass: wopus_email + imap: imap.wopus.com.br + smtp: smtp.wopus.com.br + pass: Work/wopus_email + nextcloud: + user: lelgenio + host: cloud.disroot.org + pass: disroot.org ############################################################### profiles: @@ -202,7 +210,7 @@ dynvariables: accent_color_name: test -n "$_ACCENT_COLOR" && echo "$_ACCENT_COLOR" || echo red firefox_profile: cat ~/.mozilla/firefox/profiles.ini | grep '^Default' | head -n1 | cut -d= -f2 deezer_arl: pass show Entertainment/Deezer | awk '/^arl:/ {print $2}' - main_password: _pass_get "{{@@ mail.personal.mail @@}}" | base64 + main_password: _pass_get "{{@@ mail.personal.pass @@}}" | base64 ############################################################### actions: @@ -250,6 +258,7 @@ actions: lnMail: | ln -fs ~/.config/neomutt/mbsyncrc ~/.mbsyncrc ln -fs ~/.config/neomutt/urlview ~/.urlview + ln -fs ~/.config/neomutt/msmtprc ~/.msmtprc ranger_icons: git clone diff --git a/dotfiles/dav/vdirsyncer/config b/dotfiles/dav/vdirsyncer/config index 2dde242..fd8a5b1 100644 --- a/dotfiles/dav/vdirsyncer/config +++ b/dotfiles/dav/vdirsyncer/config @@ -53,9 +53,9 @@ fileext = ".vcf" [storage contacts_remote] type = "carddav" -url = "https://cloud.{{@@ mail.personal.mail @@}}/remote.php/dav/addressbooks/users/{{@@ mail.personal.user @@}}/" -username = "{{@@ mail.personal.user @@}}@{{@@ mail.personal.mail @@}}" -password.fetch = [ "command", "_pass_get", "{{@@ mail.personal.mail @@}}" ] +url = "https://{{@@ nextcloud.host @@}}/remote.php/dav/addressbooks/users/{{@@ nextcloud.user @@}}/" +username = "{{@@ nextcloud.user @@}}" +password.fetch = [ "command", "_pass_get", "{{@@ nextcloud.pass @@}}" ] # CALDAV [pair calendar] @@ -73,8 +73,8 @@ fileext = ".ics" [storage calendar_remote] type = "caldav" -url = "https://cloud.{{@@ mail.personal.mail @@}}/remote.php/dav/calendars/{{@@ mail.personal.user @@}}/" -username = "{{@@ mail.personal.user @@}}@{{@@ mail.personal.mail @@}}" -password.fetch = [ "command", "_pass_get", "{{@@ mail.personal.mail @@}}" ] +url = "https://{{@@ nextcloud.host @@}}/remote.php/dav/calendars/{{@@ nextcloud.user @@}}/" +username = "{{@@ nextcloud.user @@}}" +password.fetch = [ "command", "_pass_get", "{{@@ nextcloud.pass @@}}" ] # vim: ft=ini diff --git a/dotfiles/git/config b/dotfiles/git/config index bcbd57d..b9d6ecc 100644 --- a/dotfiles/git/config +++ b/dotfiles/git/config @@ -8,7 +8,7 @@ [user] name = {{@@ username @@}} - email = {{@@ mail.personal.user @@}}@{{@@ mail.personal.mail @@}} + email = {{@@ mail.personal.user @@}} [init] defaultBranch = main diff --git a/dotfiles/git/config-work b/dotfiles/git/config-work index 0c0862b..c38b83b 100644 --- a/dotfiles/git/config-work +++ b/dotfiles/git/config-work @@ -7,7 +7,7 @@ [user] - name = {{@@ mail.work.user.split("@")[0] | capitalize @@}} - email = {{@@ mail.work.user.split("@")[0] @@}}@{{@@ mail.work.mail @@}} + name = {{@@ mail.work.from | capitalize @@}} + email = {{@@ mail.work.user.split("@")[0] @@}} # vim: ft=ini diff --git a/dotfiles/neomutt/mbsyncrc b/dotfiles/neomutt/mbsyncrc index 78e6d65..ab03f11 100644 --- a/dotfiles/neomutt/mbsyncrc +++ b/dotfiles/neomutt/mbsyncrc @@ -1,9 +1,9 @@ {%@@ for name, info in mail.items() | reverse @@%} IMAPStore {{@@ name @@}}-remote -Host {{@@ info.mail @@}} +Host {{@@ info.imap @@}} Port 993 -User {{@@ info.user.split("@")[0] @@}}@{{@@ info.mail @@}} +User {{@@ info.user @@}} PassCmd "_pass_get {{@@ info.pass @@}}" SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt diff --git a/dotfiles/neomutt/msmtprc b/dotfiles/neomutt/msmtprc new file mode 100644 index 0000000..7e939f7 --- /dev/null +++ b/dotfiles/neomutt/msmtprc @@ -0,0 +1,20 @@ +# Set default values for all following accounts. +defaults +auth on +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile ~/.msmtp.log + +{%@@ for name, info in mail.items() @@%} + +account {{@@ name @@}} +host {{@@ info.smtp @@}} +port 587 +from "{{@@ info.from @@}} <{{@@ info.user @@}}>" +user {{@@ info.user @@}} +passwordeval "_pass_get {{@@ info.pass @@}}" + +{%@@ endfor @@%} + +# Set a default account +account default : {{@@ (mail.keys() | list) [0] @@}} diff --git a/dotfiles/neomutt/neomuttrc b/dotfiles/neomutt/neomuttrc index 3cc0036..3e10539 100644 --- a/dotfiles/neomutt/neomuttrc +++ b/dotfiles/neomutt/neomuttrc @@ -15,21 +15,17 @@ set header_cache = ~/.cache/mutt/ set my_mailroot = ~/.local/share/mail set use_from = yes -set ssl_force_tls = yes +# set ssl_force_tls = yes {%@@ for name, info in mail.items() | reverse @@%} -set my_source_command = \ - "_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user.split("@")[0] @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' |" - - folder-hook "$my_mailroot/{{@@ name @@}}/" \ - source "\"$my_source_command\"" - source "$my_source_command" + set my_source_command = "_mutt_get-mail '{{@@ name @@}}' |" + folder-hook "$my_mailroot/{{@@ name @@}}/" source "\"$my_source_command\"" + source "$my_source_command" {%@@ endfor @@%} {%@@ for name, info in mail.items() @@%} - set my_source_command = \ - "_mutt_get-mail '{{@@ name @@}}' '{{@@ info.user.split("@")[0] @@}}' '{{@@ info.user @@}}' '{{@@ info.mail @@}}' '{{@@ info.pass @@}}' |" - macro index,pager "source \"$my_source_command\"!" + set my_source_command = "_mutt_get-mail '{{@@ name @@}}' |" + macro index,pager "source \"$my_source_command\"!" {%@@ endfor @@%} # }}} @@ -40,7 +36,7 @@ set sort = reverse-last-date set sort_aux = last-date set mail_check_stats = yes -set mail_check_stats_interval = 60 +set mail_check_stats_interval = 10 set mark_old = no # Unread mail stay unread until read set mailcap_path = ~/.config/neomutt/mailcap diff --git a/dotfiles/rclone.conf b/dotfiles/rclone.conf index 52497ed..e15880f 100644 --- a/dotfiles/rclone.conf +++ b/dotfiles/rclone.conf @@ -1,6 +1,8 @@ -[{{@@ mail.personal.mail.strip("mail.").split(".")[0] @@}}] +{%@@ set name = mail.personal.user.split("@")[1] @@%} + +[{{@@ name @@}}] type = webdav vendor = nextcloud user = {{@@ username @@}} -pass = {{@@ rclone_obscure(mail.personal.mail) @@}} -url = https://cloud.{{@@ mail.personal.mail @@}}/remote.php/webdav/ +pass = {{@@ rclone_obscure(mail.personal.pass) @@}} +url = https://cloud.{{@@ name @@}}/remote.php/webdav/ diff --git a/dotfiles/scripts/_mutt_get-mail b/dotfiles/scripts/_mutt_get-mail index 982622f..533ae52 100755 --- a/dotfiles/scripts/_mutt_get-mail +++ b/dotfiles/scripts/_mutt_get-mail @@ -1,16 +1,35 @@ #!/bin/sh -my_path="$1" -my_name="$2" -my_user="$3" -my_host="$4" -my_pass="$5" +if test "$#" -ne "1"; then + echo "Incorrect number of arguments, expected 1, got $#" >&2 +fi + +case "$1" in + {%@@ for name, info in mail.items() @@%} + + {{@@ name @@}}) + my_path="{{@@ name @@}}" + my_name="{{@@ info.from @@}}" + my_user="{{@@ info.user @@}}" + # my_host="{{@@ info.imap @@}}" + my_pass=`_pass_get "{{@@ info.pass @@}}"` + ;; + + {%@@ endfor @@%} + *) + echo "No valid account named $1" >&2 + exit 1 + ;; +esac cat < /dev/null + if ! ping -c3 {{@@ mail.personal.imap @@}} > /dev/null then exit 0 fi diff --git a/void.freeze b/void.freeze index 4ef4d71..5823d59 100644 --- a/void.freeze +++ b/void.freeze @@ -18,11 +18,13 @@ cargo-edit-0.8.0_1 chromium-97.0.4692.99_1 clyrics-0.13_1 cmatrix-2.0_1 +cool-retro-term-1.1.1_1 cronie-1.5.7_1 cryptsetup-2.4.3_1 curl-7.81.0_2 dconf-0.40.0_1 diffr-0.1.4_1 +direnv-2.30.3_1 docker-20.10.10_1 docker-compose-1.29.2_2 dust-0.7.5_1 @@ -37,7 +39,6 @@ fd-8.3.2_1 firefox-96.0.2_1 fish-shell-3.3.1_1 flatpak-1.12.4_1 -font-awesome-4.7.0_3 font-hack-ttf-3.003_2 fuse-sshfs-3.7.2_1 fzf-0.29.0_1 @@ -105,6 +106,7 @@ mpDris2-0.9.1_1 mpc-0.33_1 mpd-0.23.5_2 mpv-0.34.1_1 +msmtp-1.8.18_1 mtr-0.95_1 nano-6.0_1 ncmpcpp-0.9.2_4 @@ -145,7 +147,7 @@ pulseaudio-15.0_3 pulsemixer-1.5.1_2 python3-ipython-7.31.0_1 python3-neovim-0.4.3_2 -python3-pip-21.3.1_1 +python3-pip-22.0.2_1 python3-wheel-0.37.0_2 qemu-6.1.0_3 qt5-5.15.3+20211001_2 @@ -169,10 +171,11 @@ socklog-void-20200115_2 source-sans-pro-3.028_1 speedtest-cli-2.1.3_2 starship-1.2.1_1 +swappy-1.3.1_1 sway-1.6.1_1 swayidle-1.7.1_1 swaylock-1.5_1 -syncthing-1.18.6_1 +syncthing-1.19.0_1 tealdeer-1.5.0_1 telegram-desktop-3.4.8_1 tesseract-ocr-eng-4.1.1_6