Browse Source

some more changes on the mail setup

rework-profiles
parent
commit
1a48d357d2
8 changed files with 49 additions and 32 deletions
  1. +2
    -0
      README.md
  2. +6
    -2
      common/default.nix
  3. +1
    -0
      common/mail.nix
  4. +14
    -5
      common/users.nix
  5. +1
    -2
      common/xdg.nix
  6. +11
    -22
      dotfiles/mail/mutt/mutt-main.muttrc
  7. +14
    -0
      dotfiles/mail/notmuch
  8. +0
    -1
      dotfiles/xdg/gnupg/gpg-agent.conf

+ 2
- 0
README.md View File

@ -9,8 +9,10 @@ Currently the machines populated by this configuration are:
Features in need of development are:
* redirect IPv6 through tor
* weechat-matrix and vim-prosession !!!
* switch to pass in dotfiles
* auto import my gpg secret key
* fix ibus daemon
* security hardening through sandboxing


+ 6
- 2
common/default.nix View File

@ -30,7 +30,7 @@ in
# basic set of tools & ssh
environment.systemPackages = with pkgs; [
wget neovim tmux git git-crypt pinentry-curses
rsync imagemagick python-pkgs pass mosh
rsync imagemagick python-pkgs pass mosh gnupg
];
programs.mosh.enable = true;
@ -63,6 +63,10 @@ in
console.earlySetup = true;
boot.loader.timeout = 1;
networking.domain = "govanify.com";
programs.gnupg.agent.enable = true;
# we do not use gpg agent as all gpg keys used are available _without_ a
# password, if someone is able to snoop into my user files they will sooner
# or later get the password anyways
}

+ 1
- 0
common/mail.nix View File

@ -11,6 +11,7 @@
home.file.".config/msmtp/config".source = ./../dotfiles/mail/msmtp/config;
home.file.".config/mbsync/config".source = ./../dotfiles/mail/mbsync/config;
home.file.".config/mutt".source = ./../dotfiles/mail/mutt;
home.file.".config/notmuch".source = ./../dotfiles/mail/notmuch;
};
#environment.shellAliases = { neomutt = "mutt"; };


+ 14
- 5
common/users.nix View File

@ -2,14 +2,23 @@
{
imports =
[ ./../secrets/passwords.nix
];
];
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.govanify = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio" ];
users.users.govanify = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio" ];
# TODO
#openssh.authorizedKeys.keys
};
}
home-manager.users.govanify = {
programs.git = {
enable = true;
userName = "gauvain@govanify.com";
userEmail = "Gauvain Roussel-Tarbouriech";
};
};
}

+ 1
- 2
common/xdg.nix View File

@ -33,12 +33,11 @@
WGETRC = "$HOME/.config/wgetrc";
PYTHONSTARTUP = "$HOME/.config/python/startup.py";
PASSWORD_STORE_DIR = "$HOME/.config/pass";
NOTMUCH_CONFIG = "$HOME/.config/notmuch";
};
home-manager.users.govanify = {
home.file.".config/wgetrc".source = ./../dotfiles/xdg/wgetrc;
# not technically entirely xdg but it doesn't choose our pinentry otherwise
home.file.".config/gnupg/gpg-agent.conf".source = ./../dotfiles/xdg/gnupg/gpg-agent.conf;
home.file.".config/python/startup.py".source = ./../dotfiles/xdg/python/startup.py;
};


+ 11
- 22
dotfiles/mail/mutt/mutt-main.muttrc View File

@ -1,39 +1,22 @@
# vim: filetype=neomuttrc
# This file contains all of mutt-wizard's default settings.
# mutt-wizard will have this file sourced from your muttrc.
# In the interest of seamless updating, do not edit this file.
# If you want to override any settings, set those in your muttrc.
#
#
#
#
#
#
#
# TODO: add an automatic mailcount when reading mails or doing stuff
# pgp stuff
set crypt_use_gpgme = yes
set crypt_autosign=yes
set crypt_verify_sig=yes
set crypt_replysign=yes
set crypt_replyencrypt=yes
set crypt_replysignencrypted=yes
#set crypt_autoencrypt = yes
set pgp_default_key="52142D39A7CEF8FA872BCA7FDE62E1E2A6145556"
set pgp_check_gpg_decrypt_status_fd
set pgp_use_gpg_agent = yes
set pgp_self_encrypt = yes
#message-hook . "exec ~/.config/mutt/mail_count.sh"
set mailcap_path = ~/.config/mutt/mailcap
set date_format="%d/%m/%y %I:%M%p"
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
set sort = 'threads'
set sort_aux = 'reverse-date'
set smtp_authenticators = 'gssapi:login'
set query_command = "abook --mutt-query '%s'"
set query_command = "abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_CACHE_HOME"/abook/addressbook --mutt-query '%s'"
set rfc2047_parameters = yes
set sleep_time = 0 # Pause 0 seconds for informational messages
set markers = no # Disables the `+` displayed at line wraps
@ -53,6 +36,9 @@ alternative_order text/plain text/enriched text/html
bind index,pager i noop
bind index,pager g noop
bind index \Cf noop
# maybe execute macro S?
timeout-hook "exec sync-mailbox"
# General rebindings
@ -85,12 +71,12 @@ bind index \005 next-undeleted # Mouse wheel
bind pager \031 previous-line # Mouse wheel
bind pager \005 next-line # Mouse wheel
bind editor <Tab> complete-query
bind index,pager x entire-thread
macro index,pager S "<sync-mailbox><shell-escape>~/.config/mutt/mail_count.sh &<enter>" "flush all changes and synchronize"
macro index,pager S "<sync-mailbox><shell-escape>~/.config/mutt/mailsync.sh &> /dev/null &<enter>" "flush all changes and synchronize"
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_CACHE_HOME"/abook/addressbook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
macro index O "<shell-escape>mbsync -a -c $XDG_CONFIG_HOME/mbsync/config<enter>" "run mbsync to sync all mail"
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
macro index A "<limit>all\n" "show all messages (undo limit)"
@ -108,6 +94,9 @@ bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'


+ 14
- 0
dotfiles/mail/notmuch View File

@ -0,0 +1,14 @@
[database]
path=/home/govanify/.local/share/mail
[user]
name=Gauvain Roussel-Tarbouriech
primary_email=gauvain@govanify.com
[new]
tags=unread;inbox;
ignore=
[search]
exclude_tags=deleted;spam;
[maildir]
synchronize_flags=true
[crypto]
gpg_path=gpg

+ 0
- 1
dotfiles/xdg/gnupg/gpg-agent.conf View File

@ -1 +0,0 @@
pinentry-program /run/current-system/sw/bin/pinentry-curses

Loading…
Cancel
Save