Compare commits
No commits in common. "2c0a39299038ef3d594a68f8bc1432f456e0dbb8" and "b0de53040c2073d02c53ff23672c6ebb0be6e49b" have entirely different histories.
2c0a392990
...
b0de53040c
3 changed files with 5 additions and 165 deletions
|
|
@ -1,143 +0,0 @@
|
||||||
{config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
mailNotify = pkgs.writeShellScript "mail-notify" ''
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
${pkgs.notmuch}/bin/notmuch new >/dev/null
|
|
||||||
|
|
||||||
${pkgs.notmuch}/bin/notmuch search \
|
|
||||||
--format=json \
|
|
||||||
'tag:new' |
|
|
||||||
${pkgs.jq}/bin/jq -r '.[] | [.authors, .subject] | @tsv' |
|
|
||||||
while IFS=$'\t' read -r sender subject; do
|
|
||||||
${pkgs.libnotify}/bin/notify-send \
|
|
||||||
--app-name="Mail" \
|
|
||||||
"New email from $sender" \
|
|
||||||
"$subject"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Don't notify about these messages again next sync.
|
|
||||||
${pkgs.notmuch}/bin/notmuch tag -new -- 'tag:new'
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
accounts.email = {
|
|
||||||
maildirBasePath = "Mail";
|
|
||||||
|
|
||||||
accounts.personal = {
|
|
||||||
primary = true;
|
|
||||||
address = "alex@alexselimov.com";
|
|
||||||
realName = "Alex Selimov";
|
|
||||||
userName = "alex";
|
|
||||||
|
|
||||||
passwordCommand = "${pkgs.pass}/bin/pass show alex@alexselimov.xyz";
|
|
||||||
|
|
||||||
imap = {
|
|
||||||
host = "mail.alexselimov.com";
|
|
||||||
port = 993;
|
|
||||||
|
|
||||||
tls = {
|
|
||||||
enable = true;
|
|
||||||
useStartTls = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
maildir.path = "alex@alexselimov.com";
|
|
||||||
|
|
||||||
smtp = {
|
|
||||||
host = "mail.alexselimov.com";
|
|
||||||
port = 587;
|
|
||||||
|
|
||||||
tls = {
|
|
||||||
enable = true;
|
|
||||||
useStartTls = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
notmuch.enable = true;
|
|
||||||
aerc = {
|
|
||||||
enable = true;
|
|
||||||
extraAccounts = {
|
|
||||||
source = "notmuch://";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.mbsync.enable = true;
|
|
||||||
services.mbsync = {
|
|
||||||
enable = true;
|
|
||||||
frequency = "*:0/1";
|
|
||||||
postExec = "${mailNotify}";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.aerc = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
general = {
|
|
||||||
unsafe-accounts-conf = true;
|
|
||||||
};
|
|
||||||
ui.styleset-name = "zenwritten";
|
|
||||||
filters = {
|
|
||||||
"text/plain" = "wrap -w 100 | colorize";
|
|
||||||
"text/html" = "html | colorize";
|
|
||||||
};
|
|
||||||
|
|
||||||
compose = {
|
|
||||||
editor = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
viewer = {
|
|
||||||
pager = "less -R";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."aerc/binds.conf".text = ''
|
|
||||||
${builtins.readFile "${pkgs.aerc}/share/aerc/binds.conf"}
|
|
||||||
|
|
||||||
[messages]
|
|
||||||
l = :view<Enter>
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.notmuch = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
new.tags = [
|
|
||||||
"new"
|
|
||||||
"unread"
|
|
||||||
"inbox"
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
user = {
|
|
||||||
name = "Alex Selimov";
|
|
||||||
primary_email = "alex@alexselimov.com";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."aerc/stylesets/zenwritten".text = ''
|
|
||||||
*.default=true
|
|
||||||
*.normal=true
|
|
||||||
*.fg=default
|
|
||||||
*.bg=default
|
|
||||||
|
|
||||||
*.selected.reverse=toggle
|
|
||||||
|
|
||||||
title.bold=true
|
|
||||||
header.bold=true
|
|
||||||
msglist_unread.bold=true
|
|
||||||
dirlist_recent.bold=true
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.configFile."aerc/mimeapps.conf".text = ''
|
|
||||||
text/html=xdg-open
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -24,7 +24,6 @@ in
|
||||||
./theme/theme.nix
|
./theme/theme.nix
|
||||||
./fuzzel.nix
|
./fuzzel.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
./email.nix
|
|
||||||
];
|
];
|
||||||
home.username = "aselimov";
|
home.username = "aselimov";
|
||||||
home.homeDirectory = "/home/aselimov";
|
home.homeDirectory = "/home/aselimov";
|
||||||
|
|
@ -66,7 +65,6 @@ in
|
||||||
dino
|
dino
|
||||||
wtype
|
wtype
|
||||||
libnotify
|
libnotify
|
||||||
prusa-slicer
|
|
||||||
];
|
];
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,5 @@
|
||||||
{config, pkgs, ... }:
|
{config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.darkman = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
lat = 33.7490;
|
|
||||||
lng = -84.3880;
|
|
||||||
};
|
|
||||||
|
|
||||||
darkModeScripts.gsettings = ''
|
|
||||||
${pkgs.glib}/bin/gsettings \
|
|
||||||
set org.gnome.desktop.interface color-scheme prefer-dark
|
|
||||||
'';
|
|
||||||
|
|
||||||
lightModeScripts.gsettings = ''
|
|
||||||
${pkgs.glib}/bin/gsettings \
|
|
||||||
set org.gnome.desktop.interface color-scheme prefer-light
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file."bin/themer.sh" = {
|
home.file."bin/themer.sh" = {
|
||||||
executable = true;
|
executable = true;
|
||||||
text = ''
|
text = ''
|
||||||
|
|
@ -51,9 +33,12 @@
|
||||||
ln -sf "$tmux" $HOME/.config/tmux/theme.conf
|
ln -sf "$tmux" $HOME/.config/tmux/theme.conf
|
||||||
makoctl reload
|
makoctl reload
|
||||||
tmux source-file ~/.config/tmux/theme.conf
|
tmux source-file ~/.config/tmux/theme.conf
|
||||||
for sock in "$XDG_RUNTIME_DIR"/nvim.*.0; do
|
for dir in "$XDG_RUNTIME_DIR-}" "/tmp" "$HOME/.local/state/nvim"; do
|
||||||
|
[ -d "$dir" ] || continue
|
||||||
|
find "$dir" -type s -name 'nvim*' 2>/dev/null | while read -r sock; do
|
||||||
timeout 1s nvim --server "$sock" --remote-send "$keys" >/dev/null 2>&1 || true
|
timeout 1s nvim --server "$sock" --remote-send "$keys" >/dev/null 2>&1 || true
|
||||||
done
|
done
|
||||||
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue