notmuch and alot
parent
2827d2f025
commit
0c3cd27f4d
|
@ -85,6 +85,7 @@ let
|
|||
tls.enable = true;
|
||||
port = 993;
|
||||
};
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
switchAccountMacro = i: x: {
|
||||
|
@ -523,12 +524,10 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
#programs.notmuch = {
|
||||
# enable = true;
|
||||
# new = {
|
||||
# tags = ["unread" "inbox"];
|
||||
# };
|
||||
#};
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new = { tags = [ "unread" "inbox" ]; };
|
||||
};
|
||||
|
||||
programs.mbsync.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
|
|
|
@ -20,11 +20,10 @@ let
|
|||
|
||||
maildir = "${config.home.homeDirectory}/Maildir";
|
||||
passwordStoreDir = "${config.home.homeDirectory}/.password-store";
|
||||
notmuchConfig = "${config.home.homeDirectory}/.notmuch-config";
|
||||
notmuchConfig = "${config.home.homeDirectory}/.config/notmuch/default/config";
|
||||
gnupghome = "${config.home.homeDirectory}/.gnupg";
|
||||
lastrun = "${config.home.homeDirectory}/.mailsynclastrun";
|
||||
in
|
||||
pkgs.writeScriptBin "mailsync" ''
|
||||
in pkgs.writeScriptBin "mailsync" ''
|
||||
#!${shell}
|
||||
|
||||
# Run only if not already running in other instance
|
||||
|
@ -92,13 +91,13 @@ in
|
|||
${awk} '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | \
|
||||
${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${awk} '{ $1=""; if (NF>=3)$NF=""; print $0 }' | \
|
||||
${sed} 's/^[[:blank:]]*[\"'\''\'''\'\<]*//;s/[\"'\''\'''\'\>]*[[:blank:]]*$//'
|
||||
${sed} 's/^[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//'
|
||||
)
|
||||
subject=$(
|
||||
${awk} '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | \
|
||||
${head} -n 1 | ${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${sed} 's/^Subject: //' | \
|
||||
${sed} 's/^{[[:blank:]]*[\"'\''\'''\'\<]*//;s/[\"'\''\'''\'\>]*[[:blank:]]*$//' | \
|
||||
${sed} 's/^{[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//' | \
|
||||
${tr} -d '\n'
|
||||
)
|
||||
messageinfo "$from" "$subject" &
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
home.username = "rilla";
|
||||
home.homeDirectory = "/home/rilla";
|
||||
|
||||
nixpkgs.overlays = [ (self: super: { alot = stablePkgs.alot; }) ];
|
||||
|
||||
imports = [
|
||||
./arduino
|
||||
./barrier
|
||||
|
|
Loading…
Reference in New Issue