mirror of
https://github.com/kmein/niveum
synced 2026-03-20 12:01:06 +01:00
Compare commits
3 Commits
dc90c4c6ab
...
faac180148
| Author | SHA1 | Date | |
|---|---|---|---|
| faac180148 | |||
| 2691608f8c | |||
| 9678ba7b28 |
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/nix-community/home-manager.git",
|
||||
"rev": "7d9ba15214004c979d2c8733f8be12ce6502cf8a",
|
||||
"date": "2021-09-14T00:53:31+02:00",
|
||||
"path": "/nix/store/83xlchpzj511c0db0whl99x1ww1apnb5-home-manager",
|
||||
"sha256": "18kmvzinsi9xgm81dk5kyd03m3y5nn125kmbkxf66xasrg13yqdv",
|
||||
"rev": "382505714d10c6791a96712e0554587c75c5bf8b",
|
||||
"date": "2021-10-03T22:03:30+02:00",
|
||||
"path": "/nix/store/8il4jgzx3z8snrnixifvi32pippki160-home-manager",
|
||||
"sha256": "0p06wz9yfaf27c7978hcizjb3a6zb3dx1bpzky8wvyi3dh436593",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "aee6aefa230479a9c35f5d9031786c83c2db19a2",
|
||||
"date": "2021-09-14T21:10:26+08:00",
|
||||
"path": "/nix/store/jmxwzpfb24z159rnpa29drgb8z2znjl9-nixpkgs",
|
||||
"sha256": "0vy89mw8nd4jrv3byisynl7a3gsx0fsfpgqpaqz2z7vy60l1mkiq",
|
||||
"rev": "dd7cbf0c599904c890d743784e14a8fd135fac6a",
|
||||
"date": "2021-10-03T23:40:49+02:00",
|
||||
"path": "/nix/store/rdlyaxbp6iypkpzn0dhg3kafq9jzs3m7-nixpkgs",
|
||||
"sha256": "0lckjr5v53f6gfa8r31qaqfanhawmgk848fy43g9bn6r3n243vmf",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "b3083bc6933eb7fa4ee7bd4802e9f72b56f3e654",
|
||||
"date": "2021-09-13T17:06:43+02:00",
|
||||
"path": "/nix/store/18nwp35nj16hr2li3xbs6vczvw32rp5p-nixpkgs",
|
||||
"sha256": "1cj8jmzgf2rpf8n8yjsh6qsh66rqpyxh8jhn65ll15578fh98gb9",
|
||||
"rev": "92609f3d9bc3acffbdbe54fa1c591a885612aa73",
|
||||
"date": "2021-10-01T12:19:03+02:00",
|
||||
"path": "/nix/store/bqnwyddl4wg6xqz7zs1aka0ps0k4x4gl-nixpkgs",
|
||||
"sha256": "1d8q1wwlnrlxrds6f5cjrd73a0d86c6iygxzc6mkig0jrndcl5dn",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/nix-community/NUR",
|
||||
"rev": "967dc2db6c7666d5d99113c10b3ff288bf515560",
|
||||
"date": "2021-09-14T12:44:44+00:00",
|
||||
"path": "/nix/store/pyxjrg05v2z9zfsqmhg1im7z1sxcya22-NUR",
|
||||
"sha256": "1lqfny81k2kmsamrf745dm4iw1zk0kdr33hcyf37kvcn99vm870z",
|
||||
"rev": "f9dcfeea9b8c8742649c32f2fd60cb81d1c14035",
|
||||
"date": "2021-10-03T21:31:15+00:00",
|
||||
"path": "/nix/store/aa8sam2khv26rdyyxikhss2dx8bvldxh-NUR",
|
||||
"sha256": "0bx5asddilyb125zmjxa82cjn06ia7pbmx6fy8van0mhv2da5sf8",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"url": "https://github.com/krebs/retiolum",
|
||||
"rev": "5384cff550036aa3581f8c6f851392329f28ffe8",
|
||||
"date": "2021-09-19T09:32:14+02:00",
|
||||
"rev": "5bcfaddb59d19b44fb3e844c8581d217b87ff263",
|
||||
"date": "2021-10-02T02:02:14+02:00",
|
||||
"path": "/nix/store/izzhb6p76h96zmlz5xdxa1xrpixhbk4s-retiolum",
|
||||
"sha256": "07318jnkb8zycyi43fydrmrsrbq9ajhb2nnaahj1bxg77pb4wj7a",
|
||||
"fetchSubmodules": false,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://cgit.krebsco.de/stockholm",
|
||||
"rev": "20e358043546482acfa8c6134f095c1a64ef144d",
|
||||
"date": "2021-08-31T20:06:03+02:00",
|
||||
"path": "/nix/store/a03pd46kdsfy9d2q9xlzapnzkj4vf20r-stockholm",
|
||||
"sha256": "0cwl36zc68qjwcahjgc3vn9qpnyi351m6ngnq21wlncn0k2gqw4a",
|
||||
"rev": "2a7bc7b6ea7c6afa97662ed900dd5624a8a029dc",
|
||||
"date": "2021-09-28T23:07:37+02:00",
|
||||
"path": "/nix/store/d2msa1jn62rz9m2nrnwgk3w5vhp6jpq2-stockholm",
|
||||
"sha256": "0n7h6m4brbvnfb20snjdn0ag28ja9f5c1aiincnhhghz2gq8blms",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -217,11 +217,12 @@ in {
|
||||
./i3.nix
|
||||
./keybase.nix
|
||||
./keyboard.nix
|
||||
./mail/client.nix
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
./mime.nix
|
||||
./nano.nix
|
||||
./neovim.nix
|
||||
./neomutt.nix
|
||||
./nix.nix
|
||||
./newsboat.nix
|
||||
./flameshot-once.nix
|
||||
|
||||
27
configs/lb.nix
Normal file
27
configs/lb.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
in
|
||||
{
|
||||
systemd.services.lb-subscription = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
startAt = "weekly";
|
||||
serviceConfig = {
|
||||
user = "kfm";
|
||||
WorkingDirectory = "/home/kfm/cloud/Seafile/Books/Germanistik/LB";
|
||||
};
|
||||
script = ''
|
||||
first_year=2019
|
||||
for year in $(${pkgs.coreutils}/bin/seq "$first_year" "$(date +%Y)"); do
|
||||
${pkgs.curl}/bin/curl -sSL "https://www.literarische-blaetter.de/jahrgang-$year/" \
|
||||
| ${nixpkgs-unstable.htmlq}/bin/htmlq --attribute href 'ul.slides a' \
|
||||
| while read -r month; do
|
||||
${pkgs.curl}/bin/curl -sSL "$month" \
|
||||
| ${nixpkgs-unstable.htmlq}/bin/htmlq --attribute src iframe \
|
||||
| ${pkgs.gnused}/bin/sed 's/.*?pdf=//;s/?wp-hosted.*//'
|
||||
done
|
||||
done | ${pkgs.findutils}/bin/xargs ${pkgs.wget}/bin/wget --no-clobber
|
||||
'';
|
||||
};
|
||||
}
|
||||
247
configs/neomutt.nix
Normal file
247
configs/neomutt.nix
Normal file
@@ -0,0 +1,247 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
accounts.meinhark = {
|
||||
user = "meinhark";
|
||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
||||
address = "kieran.felix.meinhardt@hu-berlin.de";
|
||||
imap = "mailbox.cms.hu-berlin.de";
|
||||
smtp = "mailhost.cms.hu-berlin.de";
|
||||
smtpSettings = smtp: "smtp://${smtp}";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.meinhaki = {
|
||||
user = "meinhaki";
|
||||
password = lib.strings.fileContents <secrets/mail/meinhaki>;
|
||||
address = "kieran.meinhardt@hu-berlin.de";
|
||||
imap = "mailbox.cms.hu-berlin.de";
|
||||
smtp = "mailhost.cms.hu-berlin.de";
|
||||
smtpSettings = smtp: "smtp://${smtp}";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.fysi = rec {
|
||||
user = "kieran@fysi.tech";
|
||||
address = user;
|
||||
password = lib.strings.fileContents <secrets/mail/fastmail>;
|
||||
imap = "imap.fastmail.com";
|
||||
smtp = "smtp.fastmail.com";
|
||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.cock = rec {
|
||||
user = "2210@cock.li";
|
||||
address = user;
|
||||
password = lib.strings.fileContents <secrets/mail/cock>;
|
||||
imap = "mail.cock.li";
|
||||
smtp = imap;
|
||||
smtpSettings = smtp: "smtp://${smtp}:587";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.posteo = rec {
|
||||
user = "kieran.meinhardt@posteo.net";
|
||||
address = user;
|
||||
password = lib.strings.fileContents <secrets/mail/posteo>;
|
||||
imap = "posteo.de";
|
||||
smtp = imap;
|
||||
smtpSettings = smtp: "smtp://${smtp}";
|
||||
folders = {
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.amroplay = rec {
|
||||
user = "amroplay@gmail.com";
|
||||
address = user;
|
||||
password = lib.strings.fileContents <secrets/mail/gmail/amroplay>;
|
||||
imap = "imap.gmail.com";
|
||||
smtp = "smtp.gmail.com";
|
||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||
folders = {
|
||||
drafts = "[Gmail]/Drafts";
|
||||
sent = "[Gmail]/Sent Mail";
|
||||
trash = "[Gmail]/Bin";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.kieran-gmail = rec {
|
||||
user = "kieran.meinhardt@gmail.com";
|
||||
address = user;
|
||||
password = lib.strings.fileContents <secrets/mail/gmail/kieran.meinhardt>;
|
||||
imap = "imap.gmail.com";
|
||||
smtp = "smtp.gmail.com";
|
||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||
folders = {
|
||||
drafts = "[Gmail]/Entwürfe";
|
||||
sent = "[Gmail]/Gesendet";
|
||||
trash = "[Gmail]/Papierkorb";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.neomutt ];
|
||||
|
||||
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = ''
|
||||
set mailcap_path = ${pkgs.writeText "mailcap" ''
|
||||
text/plain; $EDITOR %s ;
|
||||
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
|
||||
image/*; ${pkgs.sxiv}/bin/sxiv %s ;
|
||||
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
||||
audio/*; ${pkgs.mpv}/bin/mpv %s ;
|
||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
||||
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
||||
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
||||
''}:$mailcap_path
|
||||
|
||||
set sidebar_visible
|
||||
set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S"
|
||||
set sidebar_width = 25 # Plenty of space
|
||||
set sidebar_divider_char = '│' # Pretty line-drawing character
|
||||
set mail_check_stats
|
||||
|
||||
set index_format="%2C %Z %D %-15.15L %s"
|
||||
set date_format="%F %R"
|
||||
|
||||
set sort = 'reverse-date'
|
||||
set sleep_time = 0 # Pause 0 seconds for informational messages
|
||||
set markers = no # Disables the `+` displayed at line wraps
|
||||
set mark_old = no # Unread mail stay unread until read
|
||||
set mime_forward = yes # attachments are forwarded with mail
|
||||
set wait_key = no # mutt won't ask "press key to continue"
|
||||
set fast_reply # skip to compose when replying
|
||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
||||
set forward_quote # include message in forwards
|
||||
set reverse_name # reply as whomever it was to
|
||||
set include=ask-no # don't include message in replies
|
||||
auto_view text/html # automatically show html (mailcap uses lynx)
|
||||
auto_view application/pgp-encrypted
|
||||
alternative_order text/plain text/enriched text/html
|
||||
|
||||
set abort_noattach abort_noattach_regex="\<(attach|attached|attachments?|Anhang|angehängt)\>"
|
||||
set attach_save_dir=/tmp
|
||||
set fast_reply
|
||||
|
||||
set narrow_tree # narrow threads for more depth
|
||||
|
||||
bind index,pager B sidebar-toggle-visible # Use 'B' to switch the Sidebar on and off
|
||||
bind index,pager \Ck sidebar-prev
|
||||
bind index,pager \Cj sidebar-next
|
||||
bind index,pager \Co sidebar-open
|
||||
bind index,pager \Cp sidebar-prev-new
|
||||
bind index,pager \Cn sidebar-next-new
|
||||
|
||||
set query_command = "khard email --parsable %s"
|
||||
bind editor <Tab> complete-query
|
||||
bind editor ^T complete
|
||||
|
||||
set mail_check = 90
|
||||
set timeout = 15
|
||||
# set imap_check_subscribed
|
||||
set use_from
|
||||
|
||||
set spoolfile="+INBOX"
|
||||
|
||||
set header_cache="~/.cache/mutt" message_cachedir="~/.cache/mutt"
|
||||
|
||||
source ${pkgs.writeText "accounts.neomuttrc" ''
|
||||
set realname = "Kierán Meinhardt"
|
||||
account-hook . 'unset imap_user imap_pass smtp_user smtp_pass'
|
||||
# set accordingly: postponed trash record
|
||||
${lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: let imapRoot = "imaps://${account.user}@${account.imap}"; in ''
|
||||
account-hook ${account.user}@${account.imap} 'set imap_user="${account.user}" imap_pass="${account.password}"'
|
||||
account-hook ${account.user}@${account.smtp} 'set smtp_user="${account.user}" smtp_pass="${account.password}"'
|
||||
folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"'
|
||||
named-mailboxes "${name}" ${imapRoot} ${
|
||||
lib.concatStringsSep " "
|
||||
(lib.mapAttrsToList
|
||||
(folder: imapFolder: ''"${name}.${folder}" "${imapRoot}/${imapFolder}"'')
|
||||
account.folders)
|
||||
}
|
||||
'') accounts)}
|
||||
''}
|
||||
|
||||
source ${pkgs.writeText "colors.neomuttrc" ''
|
||||
# Default index colors:
|
||||
# color index yellow default '.*'
|
||||
color index_author red default '.*'
|
||||
color index_number blue default
|
||||
color index_subject cyan default '.*'
|
||||
|
||||
# New mail is boldened:
|
||||
# color index brightyellow black "~N"
|
||||
color index_author brightred black "~N"
|
||||
color index_subject brightcyan black "~N"
|
||||
|
||||
# Tagged mail is highlighted:
|
||||
color index brightyellow blue "~T"
|
||||
color index_author brightred blue "~T"
|
||||
color index_subject brightcyan blue "~T"
|
||||
|
||||
# Other colors and aesthetic settings:
|
||||
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 red 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
|
||||
|
||||
# Regex highlighting:
|
||||
color header blue default ".*"
|
||||
color header brightmagenta default "^(From)"
|
||||
color header brightcyan default "^(Subject)"
|
||||
color header brightwhite default "^(CC|BCC)"
|
||||
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 yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
||||
color body red default "(BAD signature)|^gpg: BAD signature from.*"
|
||||
color body brightgreen default "(Good signature)|^gpg: Good signature .*"
|
||||
color body brightyellow default "^gpg: "
|
||||
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<>\"]"
|
||||
''}
|
||||
'';
|
||||
}
|
||||
@@ -100,17 +100,6 @@ in {
|
||||
| ${pkgs.jq}/bin/jq -r '"💉 Ⅰ \(.data.quote * 1000 | floor | . / 10)% Ⅱ \(.data.secondVaccination.quote * 1000 | floor | . / 10)%"'
|
||||
'';
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 30;
|
||||
command =
|
||||
let query = "tag:unread AND tag:inbox";
|
||||
in pkgs.writers.writeDash "count-new-mail" ''
|
||||
mail_count="$(${pkgs.notmuch}/bin/notmuch search ${lib.escapeShellArg query} | wc -l)"
|
||||
[ "$mail_count" = 0 ] && printf "📭" || printf "📬"
|
||||
echo "$mail_count"
|
||||
'';
|
||||
}
|
||||
(let service = "openvpn-hu-berlin"; in {
|
||||
block = "custom";
|
||||
interval = 5;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<niveum/configs/traadfri.nix>
|
||||
<niveum/configs/moodle-dl/meinhark.nix>
|
||||
<niveum/configs/monitoring/push.nix>
|
||||
<niveum/configs/mail/fetcher.nix>
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user