add mail
All checks were successful
nixos config pipeline / show-flake (push) Successful in 42s
nixos config pipeline / deploy (push) Successful in 1m4s

This commit is contained in:
smayzy 2026-03-06 19:56:49 +01:00
parent 5ce68a33b6
commit 75f60590ad
13 changed files with 245 additions and 12 deletions

38
dotfiles/isyncrc Normal file
View File

@ -0,0 +1,38 @@
IMAPStore smayzy-remote
Host mail.smayzy.ovh
User smayzy@smayzy.ovh
PassCmd "pass mail/smayzy"
TLSType IMAPS
MaildirStore smayzy-local
Path ~/Mail/smayzy/
Inbox ~/Mail/smayzy/INBOX
SubFolders Verbatim
Channel smayzy
Far :smayzy-remote:
Near :smayzy-local:
Create Both
Expunge Both
Patterns *
SyncState *
IMAPStore baptiste.maylin-remote
Host mail.smayzy.ovh
User baptiste.maylin@smayzy.ovh
PassCmd "pass mail/baptiste.maylin"
TLSType IMAPS
MaildirStore baptiste.maylin-local
Path ~/Mail/baptiste.maylin/
Inbox ~/Mail/baptiste.maylin/INBOX
SubFolders Verbatim
Channel baptiste.maylin
Far :baptiste.maylin-remote:
Near :baptiste.maylin-local:
Create Both
Expunge Both
Patterns *
SyncState *

25
dotfiles/msmtp/config Normal file
View File

@ -0,0 +1,25 @@
defaults
tls on
tls_starttls off
auth on
logfile ~/.msmtp.log
timeout 60
account smayzy
host mail.smayzy.ovh
port 465
domain smayzy.ovh
from smayzy@smayzy.ovh
user smayzy@smayzy.ovh
passwordeval pass mail/smayzy
account baptiste.maylin
host mail.smayzy.ovh
port 465
domain smayzy.ovh
from baptiste.maylin@smayzy.ovh
user baptiste.maylin@smayzy.ovh
passwordeval pass mail/baptiste.maylin
account default : smayzy

View File

@ -0,0 +1,15 @@
# vim: syntax=neomuttrc
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Ce sidebar-open
bind index,pager V sidebar-toggle-visible
bind index,pager j next-entry
bind index,pager k previous-entry
bind index,pager J next-page
bind index,pager K previous-page
bind editor \C_ bol
bind editor \Cd kill-line
bind editor \Cr history-search

View File

@ -0,0 +1,68 @@
# vim: filetype=neomuttrc
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Header colors:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"

40
dotfiles/neomutt/muttrc Normal file
View File

@ -0,0 +1,40 @@
# vim: syntax=neomuttrc
set editor = "vim"
source color.muttrc
source bind.muttrc
set ssl_force_tls = yes
set mail_check_stats
set sidebar_visible = yes
set sidebar_width = 40
set sidebar_short_path = yes
set sidebar_delim_chars = '/'
set sidebar_on_right = yes
set sidebar_format = '%B%<F? [%F]>%* %<N?%N/>%S'
set spoolfile = "~/Mail/smayzy/INBOX"
set folder = "~/Mail/smayzy"
mailboxes `for u in smayzy baptiste.maylin; do echo "$HOME/Mail/placeholder/------$u------"; find ~/Mail/$u -type d -name cur | xargs dirname; done | xargs`
folder-hook ~/Mail/smayzy/.* "\
set from='smayzy@smayzy.ovh';\
set realname='Smayzy';\
set folder='~/Mail/smayzy';\
set spoolfile='+INBOX';\
set record='+Sent';\
set postponed='+Drafts';\
set trash='+Trash';\
set sendmail='msmtp -a smayzy'"
folder-hook ~/Mail/baptiste.maylin/.* "\
set from='baptiste.maylin@smayzy.ovh';\
set realname='Baptiste Maylin';\
set folder='~/Mail/baptiste.maylin';\
set spoolfile='+INBOX';\
set record='+Sent';\
set postponed='+Drafts';\
set trash='+Trash';\
set sendmail='msmtp -a baptiste.maylin'"

View File

@ -113,6 +113,4 @@
}
'';
programs.gnupg.agent.enable = true;
}

View File

@ -26,6 +26,4 @@
system.stateVersion = "24.11";
networking.hostName = "laptop1";
programs.gnupg.agent.enable = true;
}

View File

@ -2,5 +2,6 @@
{
imports = [
./fastfetch.nix
./mail.nix
];
}

View File

@ -0,0 +1,29 @@
{
lib,
smayzy,
...
}:
let
mkIf = lib.mkIf;
in
{
config = mkIf smayzy.mail.enable {
home.file = {
".config/neomutt" = {
source = builtins.toPath ../../../dotfiles/neomutt;
recursive = true;
force = true;
};
".config/isyncrc" = {
source = builtins.toPath ../../../dotfiles/isyncrc;
recursive = true;
force = true;
};
".config/msmtp" = {
source = builtins.toPath ../../../dotfiles/msmtp;
recursive = true;
force = true;
};
};
};
}

View File

@ -31,6 +31,7 @@ in
chromium.enable = true;
wireshark.enable = true;
alacritty.enable = true;
mail.enable = true;
};
programs.firefox.enable = true;
environment.systemPackages = with pkgs; [
@ -54,10 +55,6 @@ in
arduino-cli
firejail
qbittorrent
neomutt
pass
isync
msmtp
];
};
}

View File

@ -36,6 +36,7 @@ in
chromium.enable = true;
wireshark.enable = true;
steam.enable = true;
mail.enable = true;
};
programs.firefox.enable = true;
@ -59,10 +60,6 @@ in
arduino-ide
arduino-cli
firejail
neomutt
pass
isync
msmtp
];
};
}

View File

@ -3,5 +3,6 @@
imports = [
./openssh.nix
./wireshark.nix
./mail.nix
];
}

View File

@ -0,0 +1,26 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkIf mkOption types;
in
{
options.smayzy.mail.enable = mkOption {
type = types.bool;
default = false;
description = "enables neomut isync and msmtp";
};
config = mkIf config.smayzy.mail.enable {
environment.systemPackages = with pkgs; [
neomutt
isync
msmtp
pass
];
programs.gnupg.agent.enable = true;
};
}