aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2025-06-14 10:12:33 +0530
committerAaditya Dhruv <[email protected]>2025-06-14 10:12:33 +0530
commitbd8919afb109efa0a92def766aca81f1e2e146fa (patch)
treea3cfbd93f8f0be44dd666969abdb20a27d6db84c
parent90b9ea4267ee04e1fe6f808ae322d4ad36edc693 (diff)
Update neovim, neomutt, and shell configurations
-rw-r--r--src/config/files/neomutt/mailcap1
-rw-r--r--src/config/files/neovim/vimrc (renamed from src/config/files/neovim/.vimrc)0
-rw-r--r--src/config/files/shell/bashrc (renamed from src/config/files/shell/.bashrc)0
-rw-r--r--src/config/files/shell/bashrc.d/10-export.sh (renamed from src/config/files/shell/10-export.sh)0
-rw-r--r--src/config/files/shell/bashrc.d/20-aliases.sh (renamed from src/config/files/shell/20-aliases.sh)0
-rw-r--r--src/config/files/shell/bashrc.d/30-functions.sh (renamed from src/config/files/shell/30-functions.sh)0
-rw-r--r--src/config/tasks/main.yaml147
-rw-r--r--src/config/templates/neomutt/mbsyncrc.j222
-rw-r--r--src/config/templates/neomutt/msmtprc.j211
-rw-r--r--src/config/templates/neomutt/neomuttrc.j283
10 files changed, 203 insertions, 61 deletions
diff --git a/src/config/files/neomutt/mailcap b/src/config/files/neomutt/mailcap
new file mode 100644
index 0000000..f93be9a
--- /dev/null
+++ b/src/config/files/neomutt/mailcap
@@ -0,0 +1 @@
+text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput
diff --git a/src/config/files/neovim/.vimrc b/src/config/files/neovim/vimrc
index f74d01b..f74d01b 100644
--- a/src/config/files/neovim/.vimrc
+++ b/src/config/files/neovim/vimrc
diff --git a/src/config/files/shell/.bashrc b/src/config/files/shell/bashrc
index 2161b13..2161b13 100644
--- a/src/config/files/shell/.bashrc
+++ b/src/config/files/shell/bashrc
diff --git a/src/config/files/shell/10-export.sh b/src/config/files/shell/bashrc.d/10-export.sh
index e6c6e28..e6c6e28 100644
--- a/src/config/files/shell/10-export.sh
+++ b/src/config/files/shell/bashrc.d/10-export.sh
diff --git a/src/config/files/shell/20-aliases.sh b/src/config/files/shell/bashrc.d/20-aliases.sh
index cd91c67..cd91c67 100644
--- a/src/config/files/shell/20-aliases.sh
+++ b/src/config/files/shell/bashrc.d/20-aliases.sh
diff --git a/src/config/files/shell/30-functions.sh b/src/config/files/shell/bashrc.d/30-functions.sh
index e02e8de..e02e8de 100644
--- a/src/config/files/shell/30-functions.sh
+++ b/src/config/files/shell/bashrc.d/30-functions.sh
diff --git a/src/config/tasks/main.yaml b/src/config/tasks/main.yaml
index 4ff9787..70c8d92 100644
--- a/src/config/tasks/main.yaml
+++ b/src/config/tasks/main.yaml
@@ -1,95 +1,120 @@
-- name: Install shell items
+- name: Configure Terminal
block:
- - name: Setup ZSH
- ansible.builtin.dnf:
- name: "zsh"
- state: latest
-
- - name: Setup oh-my-zsh
+ - name: Setup Alacritty
become: true
- become_user: "{{ config.username }}"
- ansible.builtin.shell: 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended'
- ignore_errors: true
+ become_user: "{{ username }}"
+ ansible.builtin.copy:
+ src: alacritty/alacritty.toml
+ dest: "/home/{{ username }}/.config/alacritty/"
+ backup: yes
- - name: Setup zsh-autosuggestions
+ - name: Setup Shell
become: true
- become_user: "{{ config.username }}"
- ansible.builtin.shell: 'git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions'
- ignore_errors: true
+ become_user: "{{ username }}"
+ ansible.builtin.copy:
+ src: shell/bashrc
+ dest: "/home/{{ username }}/.bashrc"
+ backup: yes
- - name: Setup zsh-syntax-highlighting
+ - name: Setup shell user source directory
become: true
- become_user: "{{ config.username }}"
- ansible.builtin.shell: 'git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting'
- ignore_errors: true
+ become_user: "{{ username }}"
+ ansible.builtin.copy:
+ src: shell/bashrc.d
+ dest: "/home/{{ username }}/.bashrc.d"
+ backup: yes
- - name: Setup powerlevel10k
+ - name: Setup tmux
become: true
- become_user: "{{ config.username }}"
- ansible.builtin.shell: 'git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k'
- ignore_errors: true
+ become_user: "{{ username }}"
+ ansible.builtin.copy:
+ src: tmux/.tmux.conf
+ dest: "/home/{{ username }}"
+ backup: yes
+
- - name: Setup p10k, tmux and zshrc
+- name: Setup Editor
+ block:
+ - name: Setup vimrc
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.copy:
- src: shell/{{ item }}
- dest: "/home/{{ config.username }}"
+ src: neovim/vimrc
+ dest: "/home/{{ username }}"
backup: yes
- loop:
- - .p10k.zsh
- - .zshrc
- - .tmux.conf
- - name: Setup vimrc and vim bundles
+ - name: Setup init.vim
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.copy:
- src: shell/{{ item }}
- dest: "/home/{{ config.username }}"
+ src: neovim/init.vim
+ dest: "/home/{{ username }}/.config/nvim/"
backup: yes
- loop:
- - .vimrc
- - name: Setup vundle
+ - name: Setup Vundle
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.shell: 'git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim && vim +PluginInstall +qall'
ignore_errors: true
- name: Install autoload in right directory
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.copy:
- src: "/home/{{ config.username }}/.vim/bundle/gruvbox-material/autoload/gruvbox_material.vim"
- dest: "/home/{{ config.username }}/.vim/autoload/"
+ src: "/home/{{ username }}/.vim/bundle/gruvbox-material/autoload/gruvbox_material.vim"
+ dest: "/home/{{ username }}/.vim/autoload/"
ignore_errors: true
- name: Install colors in right directory
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.copy:
- src: "/home/{{ config.username }}/.vim/bundle/gruvbox-material/colors/gruvbox-material.vim"
- dest: "/home/{{ config.username }}/.vim/colors/"
+ src: "/home/{{ username }}/.vim/bundle/gruvbox-material/colors/gruvbox-material.vim"
+ dest: "/home/{{ username }}/.vim/colors/"
ignore_errors: true
- - name: Setup vim/neovim directories
+
+- name: Configure Email
+ block:
+ - name: Setup msmtprc
+ become: true
+ become_user: "{{ username }}"
+ ansible.builtin.template:
+ src: neomutt/msmtprc.j2
+ dest: "/home/{{ username }}/.msmtprc"
+ backup: yes
+
+ - name: Setup mbsyncrc
+ become: true
+ become_user: "{{ username }}"
+ ansible.builtin.template:
+ src: neomutt/mbsyncrc.j2
+ dest: "/home/{{ username }}/.mbsyncrc"
+ backup: yes
+
+ - name: Setup Neomutt
+ become: true
+ become_user: "{{ username }}"
+ ansible.builtin.template:
+ src: neomutt/neomuttrc.j2
+ dest: "/home/{{ username }}/.mutt/neomuttrc"
+ backup: yes
+
+ - name: Setup Neomutt - Mailcap
+ become: true
+ become_user: "{{ username }}"
+ ansible.builtin.copy:
+ src: neomutt/mailcap
+ dest: "/home/{{ username }}/.mutt/"
+ backup: yes
+
+
+- name: Configure Misc
+ block:
+ - name: Setup Wallpapers
become: true
- become_user: "{{ config.username }}"
+ become_user: "{{ username }}"
ansible.builtin.copy:
- src: "{{ item }}"
- dest: "/home/{{ config.username }}/.config"
+ src: wallpapers
+ dest: "/home/{{ username }}/.config/wallpapers"
backup: yes
- loop:
- - nvim
-
- when: 'config.config.install_shell'
-
-- name: Install Dotfiles
- become: true
- become_user: "{{ config.username }}"
- ansible.builtin.copy:
- src: "{{ item }}"
- dest: "/home/{{ config.username }}/.config/"
- backup: yes
- loop: "{{ config }}"
diff --git a/src/config/templates/neomutt/mbsyncrc.j2 b/src/config/templates/neomutt/mbsyncrc.j2
new file mode 100644
index 0000000..7ab403f
--- /dev/null
+++ b/src/config/templates/neomutt/mbsyncrc.j2
@@ -0,0 +1,22 @@
+IMAPAccount mailbox
+Host imap.mailbox.org
+User {{ mail.primary }}
+PassCmd "secret-tool lookup password mailbox"
+Port 993
+TLSType IMAPS
+
+IMAPStore mailbox-remote
+Account mailbox
+
+MaildirStore mailbox-local
+Path ~/.local/share/mail/mailbox/
+Inbox ~/.local/share/mail/mailbox/INBOX
+SubFolders Verbatim
+
+Channel mailbox
+Far :mailbox-remote:
+Near :mailbox-local:
+Patterns *
+Create Both
+Expunge Both
+SyncState *
diff --git a/src/config/templates/neomutt/msmtprc.j2 b/src/config/templates/neomutt/msmtprc.j2
new file mode 100644
index 0000000..d7f2270
--- /dev/null
+++ b/src/config/templates/neomutt/msmtprc.j2
@@ -0,0 +1,11 @@
+account mailbox
+host smtp.mailbox.org
+from {{ mail.primary }}
+user {{ mail.primary }}
+port 465
+auth on
+tls on
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+tls_starttls off
+passwordeval "secret-tool lookup password mailbox"
+logfile ~/.msmtp.log
diff --git a/src/config/templates/neomutt/neomuttrc.j2 b/src/config/templates/neomutt/neomuttrc.j2
new file mode 100644
index 0000000..e6b1fa1
--- /dev/null
+++ b/src/config/templates/neomutt/neomuttrc.j2
@@ -0,0 +1,83 @@
+set real_name = "{{ mail.name }}"
+
+# Basic settings
+set folder = "~/.local/share/mail/mailbox"
+set attach_save_dir = "~/Downloads/"
+set mbox_type = "Maildir"
+set hostname = "{{ mail.domain }}"
+set from = "{{ mail.primary }}"
+{% for item in mail.aliases %}
+alias {{ item.alias }} "{{ mail.name }}" "{{ item.email }}"
+{% endfor %}
+
+# Folder settings
+set record = +Sent
+set spoolfile = +INBOX
+set postponed = +Drafts
+set trash = +Trash
+set header_cache = ~/.cache/mutt
+mailboxes `find ~/.local/share/mail/mailbox/INBOX -type d -name cur | xargs dirname | xargs` `find ~/.local/share/mail/mailbox -maxdepth 2 -type d -name cur | grep -v INBOX | grep -v Archives | xargs dirname | xargs`
+
+
+# Sidebar settings
+set sidebar_visible
+set sidebar_format = "%B%<N? [%N]>%* %S"
+set sidebar_short_path = yes
+set mail_check_stats
+set sidebar_next_new_wrap = yes
+set sidebar_width = 20
+
+# Formatting
+set sort = threads
+set sort_aux=reverse-date
+set date_format="%y/%m/%d %I:%M%p"
+color status black white
+color sidebar_indicator brightblack white
+color indicator brightblack white
+color header blue default ".*"
+color header green default "^(From)"
+color header green default "^(Subject)"
+color header green default "^(To|CC|BCC)"
+color body red default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
+color body white default "(https?|ftp|file)://[\-\.,/%~_:?&=\#a-zA-Z0-9;+]+" # URL
+set new_mail_command = "notify-send -a 'Neomutt' --icon '/usr/share/neomutt/logo/neomutt-32.png' 'New Email in %f' '%n new messages, %u unread' &"
+set compose_show_preview = yes
+set compose_preview_min_rows = 0
+
+# Mail settings
+
+set mail_check_stats
+set mailcap_path = ~/.mutt/mailcap
+auto_view text/html
+alternative_order text/plain text/html
+set sendmail = "msmtp -a mailbox"
+
+
+
+# Reply settings
+set fast_reply
+set forward_format = "Fwd: %s"
+set forward_quote
+set reverse_name
+set include
+alternates {% for item in mail.aliases -%}
+"{{ item.email }}"
+{%- endfor %}
+
+# GPG settings
+set pgp_sign_as="{{ mail.gpg }}"
+set crypt_auto_sign
+
+
+# Bindings
+bind index,pager \Ck sidebar-prev
+bind index,pager \Cj sidebar-next
+bind index,pager \Co sidebar-open
+macro index S "<shell-escape>mbsync -a<enter>" "sync email"
+macro index a ":set confirmappend=no delete=yes\n<tag-prefix><save-message>+Archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"
+bind editor <Tab> complete-query
+bind editor \Ct complete
+
+
+# Contacts
+set query_command = "khard --skip-unparsable email --parsable %s"