1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

558 Commits

Author SHA1 Message Date
06c1be9e09 wip: flakes 2021-12-29 17:41:53 +01:00
d5087c40b2 feat: use flake nix 2021-12-28 23:24:30 +01:00
23fb65ce1e chore(retiolum): update 2021-12-28 20:49:43 +01:00
c49a5a4187 feat(retiolum): use ed25519 keys 2021-12-28 17:04:54 +01:00
42df2c032e derp 2021-12-28 17:04:54 +01:00
86d6943dd2 feat(kabsa): disable zramfs 2021-12-28 17:04:54 +01:00
6f10cd277d fix(weechat): matrix server 2021-12-28 15:39:56 +01:00
869c6e6a08 fix(vim): make a tiny bit faster 2021-12-28 14:48:29 +01:00
5b131a5a30 feat: flameshot -> flameshot-once 2021-12-28 14:48:09 +01:00
0423429e02 fix: send transits at correct time 2021-12-27 10:40:51 +01:00
f451cc5028 feat(astrolog): configure 2021-12-27 10:29:11 +01:00
8f9e8db71e fix(traadfri): dont timeout 2021-12-25 18:03:57 +01:00
81e6b5c9f6 feat: transits telegram bot 2021-12-25 08:31:11 +01:00
50d8788088 chore: update 2021-12-25 08:31:11 +01:00
805b46ffb1 feat: remove nur-packages 2021-12-25 08:31:10 +01:00
bc9217ba3e feat(weechat): improve zero covid 2021-12-22 23:08:58 +01:00
db2ec25bc1 feat: remove praesenzlehre-berlin.org 2021-12-22 23:06:54 +01:00
33b960143b feat: remove nur-packages 2021-12-22 22:55:43 +01:00
f02225d1e9 feat: use upstream astrolog 2021-12-22 10:19:16 +01:00
9c2e2df05a feat: astrolog 2021-12-21 18:17:37 +01:00
aaeef41f55 feat: anki# 2021-12-21 07:39:23 +01:00
0787da719e fix(retiolum-map): also update index.html 2021-12-20 15:10:19 +01:00
e225a7d451 feat(tinc-graph): update 2021-12-18 10:48:38 +01:00
9d3b29add2 chore: update 2021-12-17 19:02:32 +01:00
5792224240 Revert "feat(shell.nix): colourful parallel"
This reverts commit 5ade0a7011.
2021-12-17 19:02:22 +01:00
ecadc12c9f feat(zaatar): disable tuna 2021-12-16 08:46:02 +01:00
4ecc34b63e feat(tarot): update key file 2021-12-16 00:19:28 +01:00
48e2be7427 feat(tarot): serve files and waites key 2021-12-15 15:01:19 +01:00
296a3a9c9f feat(tarot): occasionally reverse 2021-12-15 15:00:46 +01:00
0136215a4a feat(tarot): run at tarot.kmein.de 2021-12-15 13:54:51 +01:00
dd8a885e81 feat: add transits script 2021-12-15 13:54:51 +01:00
e755ee06e2 feat(makanek): run tarot service on tarot.kmein.r 2021-12-15 12:38:09 +01:00
5ade0a7011 feat(shell.nix): colourful parallel 2021-12-15 12:38:09 +01:00
bed0795a04 fix(monitoring): probe alew.hu-berlin.de every 5 min 2021-12-14 19:20:11 +01:00
31d59aba6a feat(monitoring): probe alew.hu-berlin.de 2021-12-14 19:20:10 +01:00
08c04462a7 feat(monitoring): probe alew.hu-berlin.de 2021-12-13 17:29:09 +01:00
7d00a2e896 fix(pmount): setuid root 2021-12-13 11:58:00 +01:00
1027a850fb feat: add bvg disruptions script 2021-12-13 11:57:42 +01:00
314134d861 feat(hu-berlin): reenable forti vpn 2021-12-13 11:57:27 +01:00
143b2f1a06 Revert "feat(nextcloud): move to cloud.kmein.de"
This reverts commit 8a45abae35.
2021-12-11 09:45:25 +01:00
02cc600c68 feat: install pandoc users guide as man page 2021-12-10 20:25:07 +01:00
25c48354f7 feat: add csv2json and json2csv scripts 2021-12-10 19:43:06 +01:00
5b2c2c7709 feat(scripts): add auc roman calendar 2021-12-10 19:42:52 +01:00
e55cc77825 feat(readme): add attribution 2021-12-09 12:59:19 +01:00
8a45abae35 feat(nextcloud): move to cloud.kmein.de 2021-12-09 07:14:35 +01:00
e046c74539 chore(retiolum): update 2021-12-08 13:11:07 +01:00
9dae3e2d1a feat(weechat): add weechat-matrix 2021-12-08 12:15:14 +01:00
0fea7ba938 feat(moodle-dl): serve via retiolum 2021-12-08 11:39:19 +01:00
edcbe19fb2 feat: add rudimentary readme 2021-12-08 11:03:48 +01:00
ee573e13fc fix(kabsa, manakish): disable illum, hardware does it by itself 2021-12-07 20:09:22 +01:00
83d23f8b55 feat(zaatar): add gaslight 2021-12-07 20:00:10 +01:00
addd7077ed fix(khal): restore cloud address 2021-12-07 20:00:10 +01:00
ec175ef3d7 feat(khal): config format changed with 4.0.0 2021-12-07 20:00:10 +01:00
a7a103c853 feat(urlwatch): add zeno ebooks site 2021-12-04 11:35:36 +01:00
2105a5a0fe feat(weechat): #home-manager 2021-12-04 11:35:36 +01:00
d5a71770a6 feat: kierán.de -> kmein.de 2021-12-03 12:17:36 +01:00
bff6ede4c1 feat(ssh): add alew machine 2021-12-02 14:19:14 +01:00
5a82328b37 feat: make work with 21.11 2021-12-01 17:38:47 +01:00
b3871ba6aa feat(graph.r): use geoip from updater, share with retiolum 2021-12-01 12:04:26 +01:00
9b68ac87d8 chore(nextcloud): create password files 2021-12-01 12:03:55 +01:00
bbc50f3642 feat(radio, urlwatch): create groups 2021-12-01 12:03:33 +01:00
fc067a8493 feat(retiolum-map): use 21.11 geoipupdate 2021-12-01 09:58:46 +01:00
4ac499530d chore(names): update 2021-12-01 09:47:51 +01:00
078b3f6183 chore(tinc-graph): update 2021-12-01 09:47:45 +01:00
ca0267ce22 fix(tuna): new syncthing syntax 2021-12-01 09:47:14 +01:00
10d003371e fix(tuna, moodle-dl): create groups for users 2021-12-01 08:14:18 +01:00
33da8389f5 chore: update to 21.11 2021-12-01 08:14:05 +01:00
707e1f1565 chore(retiolum): update 2021-12-01 07:42:22 +01:00
312dd27f02 feat: add service to supersede graph.r 2021-11-30 22:31:19 +01:00
5a0f6d3035 feat(weechat): new variant 2021-11-30 22:31:19 +01:00
77bd1116ea chore: update 2021-11-30 22:31:19 +01:00
8d4362d903 feat(khal): configure more 2021-11-25 08:25:47 +01:00
bc4e25a42d feat(i3status-rust): increase rate 2021-11-24 18:20:04 +01:00
96627b6f50 feat(weechat): improve zero-covid 2021-11-24 11:12:34 +01:00
6f2a824d8b fix(pls): skip/like before reporting in IRC 2021-11-24 11:11:46 +01:00
a65a4b28da feat: copyq 2021-11-23 21:48:00 +01:00
41f87bdc37 feat(pls): add recent command 2021-11-23 21:47:30 +01:00
85ab948ccd feat(zaatar): install ncmpcpp 2021-11-21 11:55:04 +01:00
9f834e742e chore: update 2021-11-21 11:40:52 +01:00
416d3ab277 feat(i3status-rust): show moon fullness percentage 2021-11-20 09:40:32 +01:00
82b9bb2a4c feat(sa): add possibility of devanagari output 2021-11-20 09:39:57 +01:00
82b650bdbf fix: book reading script cannot be named "read" 2021-11-20 09:39:27 +01:00
06125303b8 feat: add some scripts for reading pdfs 2021-11-19 13:40:32 +01:00
c0efacd6ce chore: update 2021-11-19 13:40:19 +01:00
2aff28c6ed feat: astrological info script 2021-11-19 08:09:08 +01:00
e27db27fd8 chore: update 2021-11-15 18:43:47 +01:00
683bd2f3be feat: closest word script 2021-11-15 18:43:34 +01:00
01e3cef34f feat(i3): add moon phase to status bar 2021-11-13 23:39:01 +01:00
f921d3d3b6 fix(monitoring): grafana link 2021-11-13 19:17:35 +01:00
ffa3f820ce feat(pls): more insults 2021-11-12 20:22:51 +01:00
8738cb4a58 feat: kirčiuoklis script 2021-11-12 20:06:08 +01:00
a2b706e787 feat(direnv): simplify shell.nix template 2021-11-12 20:06:08 +01:00
22247715a3 feat(fonts): alegreya{,-sans} 2021-11-12 20:06:08 +01:00
bdd4bda339 fix(hedgedoc): serve ssl correctly 2021-11-12 20:06:08 +01:00
1002fd8b43 fix(NetworkManager): use constant addresses for home wifi 2021-11-12 20:06:08 +01:00
1f48644558 feat(haskell): install monad-memo, edit-distance 2021-11-12 16:03:43 +01:00
da95622df1 chore: update 2021-11-08 17:55:06 +01:00
e275c81257 fix(monitoring): display host name in reboot message 2021-11-08 10:06:29 +01:00
bf7d0165b1 feat: add more sanskrit dictionaries 2021-11-07 13:12:11 +01:00
cb10b423dc feat(mpv): reenable osc 2021-11-06 08:15:07 +01:00
a93a34e546 feat(mpv): sane screenshot template 2021-11-06 07:45:02 +01:00
c7603af4d0 fix(matterbridge): dont strip markdown 2021-11-06 07:45:02 +01:00
dd685afb7c feat(mpv): dont generate thumbnails, it is eating up my cpu 2021-11-04 07:25:40 +01:00
055b4016e6 feat(moodle-dl): two more 2021-10-28 15:16:16 +02:00
f361d2b877 feat: add russian keyboard 2021-10-28 15:06:33 +02:00
8b00faf762 feat(vdirsyncer): fix birthday calendar issue, add fysi 2021-10-26 20:43:56 +02:00
f7d72e00b6 feat(neomutt): add macros to limit messages 2021-10-24 19:16:37 +02:00
087c138906 fix(beets): remove buggy lyrics plugin 2021-10-24 19:16:37 +02:00
bf8f6d8d52 feat(i3status-rust): rewrite sun timer to work offline 2021-10-24 18:22:55 +02:00
fcf2aa4cca chore: update 2021-10-24 08:38:43 +02:00
48484514bc feat(moodle-dl): add one more course 2021-10-24 08:25:35 +02:00
aa359ad986 fix(menstruation): update to fix timezone 2021-10-21 13:29:17 +02:00
2432b0bbaa feat(moodle-dl): add one more course 2021-10-21 12:18:07 +02:00
2b754d4a5b feat(moodle-dl): add one more course 2021-10-21 12:18:07 +02:00
f38e5c3295 feat(moodle-dl): add one more course 2021-10-20 09:11:56 +02:00
f6b4740b73 chore: update 2021-10-19 22:53:56 +02:00
c06fb3f50c feat(pls): use ircaids 2021-10-19 22:42:29 +02:00
4ae2fa4a6a feat: unify/update stockholm pkgs 2021-10-19 22:42:00 +02:00
6809db5ccc feat(moodle-dl): add one more course 2021-10-19 19:41:04 +02:00
c9fb802c55 feat: install menstruation 2021-10-19 18:59:29 +02:00
2f4505d29b feat(i3status-rust): remove keyboard indicator 2021-10-19 18:55:46 +02:00
b43de46611 feat(i3status-rust): add sun timer 2021-10-19 18:02:42 +02:00
3545c37084 chore(menstruation): update 2021-10-19 17:10:18 +02:00
043fe3b67b feat(moodle-dl): one more course 2021-10-19 14:51:43 +02:00
f0779c45c3 feat(moodle-dl): two more courses 2021-10-19 14:35:12 +02:00
b7a6fda046 chore(menstruation): update 2021-10-19 10:54:30 +02:00
e431e0bf03 fix(urlwatch): make tatort more readable 2021-10-19 09:20:30 +02:00
ac54cd5eaf feat(makanek): run mensa bot 2021-10-18 21:14:52 +02:00
4bd5965915 fix(monitoring): clearly say when stuff is resolved 2021-10-18 20:56:42 +02:00
f21112465b feat(menstruation): add as submodules 2021-10-18 18:19:47 +02:00
b989684f12 feat(vdirsyncer): restart after failure 2021-10-18 07:24:43 +02:00
beef73daab feat(moodle-dl): one more course 2021-10-18 07:24:32 +02:00
de3fbfd356 feat(moodle-dl): add first WS21 courses 2021-10-17 20:18:59 +02:00
a1e88e30a7 feat(makanek): add onomastics service 2021-10-12 23:25:11 +02:00
c50698f275 feat: manage retiolum addresses globally, declaratively share moodle 2021-10-12 11:51:55 +02:00
6119c0dbcc feat: bye bye keybase 2021-10-12 11:51:14 +02:00
7dd5a9e269 feat(neomutt): dont ask about ~/Mail 2021-10-11 20:03:03 +02:00
2384a4eef5 feat: add serveHtml helper 2021-10-11 20:02:41 +02:00
f6ffd477d1 feat(zaatar): run bvg info dashboard 2021-10-11 20:02:41 +02:00
77fc7e4832 feat(i3status-rust): show current keyboard layout 2021-10-11 20:02:41 +02:00
76d75048fa feat(neomutt): add old uni account, add alias 2021-10-11 20:02:41 +02:00
71e65461cf feat: simplify use of krebs pkgs 2021-10-11 20:02:41 +02:00
6545b016c5 feat: remove traces of old mail setup 2021-10-08 22:17:05 +02:00
6eff3d831c feat(nextcloud): update 2021-10-08 20:25:54 +02:00
80abae0daa feat: spotify-tui -> ncspot 2021-10-08 20:04:05 +02:00
bbdef3a8ed feat(neomutt): add mua alias 2021-10-08 20:03:52 +02:00
1f28eb000d feat(monitoring): add uptime alert 2021-10-08 20:03:44 +02:00
fb7a295310 chore: update 2021-10-08 20:03:28 +02:00
ad84e0445d feat(neomutt): style and simplify 2021-10-08 16:00:20 +02:00
faac180148 feat: bye bye notmuch, hello neomutt 2021-10-07 08:59:54 +02:00
2691608f8c feat: LB 2021-10-07 08:59:54 +02:00
9678ba7b28 chore: update 2021-10-03 23:41:55 +02:00
dc90c4c6ab feat: qrpaste 2021-09-23 21:25:50 +02:00
4c2a4df663 feat(networkmanager): declarative 2021-09-22 08:03:47 +02:00
c60e90f001 fix(monitoring): telegram alerts grafana link 2021-09-22 07:56:17 +02:00
d0f1287c68 feat(radio): rip antenne-asb.ga 2021-09-22 07:56:17 +02:00
f91004fff6 feat(monitoring): add more rules, run grafana in retiolum 2021-09-19 12:03:52 +02:00
adca14865c feat(tuna): run on radio.kmein.r 2021-09-19 11:41:36 +02:00
4cdf954732 feat: wilde -> kabsa 2021-09-19 11:41:16 +02:00
e2bd211d4b feat: monitoring 2021-09-18 23:54:12 +02:00
d04c652f61 feat(moodle-dl): share via nfs 2021-09-18 15:53:21 +02:00
f036e50210 feat(moodle-dl): run in containers 2021-09-18 14:42:57 +02:00
8b8fbeb511 feat(moodle-dl): run on zaatar for meinhark 2021-09-18 14:36:25 +02:00
04b40f15e2 feat: install speedtest-cli when on NM 2021-09-18 09:15:14 +02:00
70755b3cec feat: install firefox, remove unused stuff 2021-09-17 21:03:28 +02:00
3ebd71971d feat(networkmanager): use prison-break from NUR 2021-09-17 20:49:39 +02:00
ca51f06e2a feat(i3): add scratchpad keys 2021-09-17 20:49:19 +02:00
0e9051aaaa feat(shell.nix): add --force for deploying dirt 2021-09-17 15:26:55 +02:00
d1079fe413 feat(wifi): networkmanager for wilde, wpa_supplicant for others 2021-09-17 15:26:40 +02:00
6418b03548 feat(weechat): autojoin #autowifi 2021-09-17 15:15:35 +02:00
ecdfd7953d feat: disable tor 2021-09-17 11:12:09 +02:00
08ab96c0db feat: add wifi@db systemd network 2021-09-17 09:45:24 +02:00
5939219f8c feat: disable kleiter 2021-09-17 09:04:25 +02:00
e2f82c3da8 fix(vim): dont showbreak with an emoji 2021-09-16 16:41:39 +02:00
0dc43c2eff feat(scripts): new-mac 2021-09-16 16:41:39 +02:00
136b04cb3f fix(docker): go around ICE wifi 2021-09-16 15:23:02 +02:00
8af855585b chore: update 2021-09-14 15:21:45 +02:00
4136e7bf3f feat(newsboat): add watch later script 2021-09-14 15:00:58 +02:00
c365f5f8b2 feat(urlwatch): watch tatort 2021-09-14 15:00:58 +02:00
d37393b1ca feat: libib script 2021-09-14 15:00:58 +02:00
b484f424af feat(weechat): filter brockman notices 2021-09-14 15:00:58 +02:00
15e2cd7e4f feat(fonts): use joypixels for monospace emoji 2021-09-11 20:41:44 +02:00
a88a0f57c2 fix(worldradio): use fork 2021-09-11 07:57:08 +02:00
4d81f0b0ac feat(spotify): use unstable 2021-09-11 07:52:17 +02:00
0971a2c575 chore: update 2021-09-11 07:47:26 +02:00
18c829f224 chore: update 2021-09-07 16:33:55 +02:00
865b0b736c fix(streams): radio record 2021-09-07 16:28:52 +02:00
84613b8d51 feat(zaatar): sync music via syncthing 2021-09-05 17:12:08 +02:00
7fcf265ffd feat(urlwatch): add lammla 2021-09-05 15:51:39 +02:00
5892702841 feat: coronabeschränkungen ausweiten 2021-09-01 15:29:41 +02:00
233fa97da5 chore: update 2021-08-31 20:37:42 +02:00
aeda9e63e6 feat: add krebs cyberlocker tools 2021-08-31 20:07:57 +02:00
80d9a1b41c feat(weechat): add oftc 2021-08-26 18:58:36 +02:00
40fd40453f chore: update 2021-08-26 15:29:41 +02:00
8beb632b1e feat(streams): comment more 2021-08-26 15:29:31 +02:00
83c9b0e30c feat(wifi): add iamateapot 2021-08-12 11:48:17 +02:00
8471f7e1e2 feat(weechat): dont log news 2021-08-11 14:49:26 +02:00
8ff3cab263 feat: add chatlog search 2021-08-11 14:49:26 +02:00
321eb82116 fix(mpv): dont always watch the highest resolution 2021-08-10 23:01:20 +02:00
9d0dc4397c chore(stockholm): update 2021-08-10 20:00:48 +02:00
6ab4332965 feat: add literate programming script 2021-08-08 09:56:15 +02:00
f00d903043 chore: update 2021-08-08 09:16:44 +02:00
cb1f3ce4f1 feat(zaatar): enable mpdscribble 2021-08-08 08:16:50 +02:00
d3e3bf92eb feat(vim): don't "fix" elm.json indentation 2021-08-08 08:12:51 +02:00
60e44ae4eb feat(urlwatch): report to telegram 2021-08-02 08:44:33 +02:00
9bc3279f52 feat: beets 2021-07-30 13:19:44 +02:00
2f75f4c3b3 chore: update retiolum 2021-07-30 13:19:44 +02:00
f8a3bfe21e feat(weechat): bye #hsmr 2021-07-26 10:15:21 +02:00
56fe6b3f00 feat(dropbox): disable 2021-07-25 09:48:43 +02:00
8746b4522a feat(weechat): improve filtering out triggers 2021-07-25 09:42:27 +02:00
e8f46cd497 chore: update 2021-07-25 09:42:27 +02:00
10a4afd59d feat(tuna): update 2021-07-25 09:42:27 +02:00
27499d6a7a feat(urlwatch): remove IG nekrolog as it was spamming 2021-07-21 08:19:07 +02:00
c20acb75f8 feat(mpv-tv): add postFetch 2021-07-19 13:46:47 +02:00
4dd00e1063 feat: replace evince by foxit 2021-07-16 12:42:26 +02:00
20df63014d Revert "feat: use fzfmenu"
This reverts commit 27a6c5833e.
2021-07-15 10:08:00 +02:00
27a6c5833e feat: use fzfmenu 2021-07-15 09:54:23 +02:00
2201b192fd feat(mpv): add youtube (auto) subtitles 2021-07-15 07:34:12 +02:00
cf2c0c7a37 feat(mpv): add thumbnail and youtube quality script 2021-07-14 22:39:18 +02:00
3a48c9860b feat(.bin): proxies scripts 2021-07-13 21:00:33 +02:00
9c44e03215 feat(streams): add more 2021-07-13 21:00:23 +02:00
d6c4899dc1 feat: mpv-tv, more readio streams in comments 2021-07-12 12:25:32 +02:00
94092fbfeb feat(streams): more in notes 2021-07-11 18:00:54 +02:00
a1e96d67b7 feat(klem): add curl script 2021-07-11 18:00:54 +02:00
a2290fd6f7 chore(urlwatch): move to makanek 2021-07-11 18:00:53 +02:00
bc2d4fb005 feat: mpc for controlling zaatar 2021-07-08 12:47:17 +02:00
a0096a771d feat(streams): add rockabilly 2021-07-08 12:45:46 +02:00
eb2f7ea275 feat(streams): bhaktiworld is not 2b! 2021-07-08 12:45:46 +02:00
c2b567664c chore: update 2021-07-08 12:45:46 +02:00
900839b9b3 feat(newsboat): move home 2021-07-08 12:45:46 +02:00
6498e5a1da feat(mpd-fm): rebrand 2021-07-08 12:45:44 +02:00
1f971b2a74 chore(urlwatch): move to makanek 2021-07-08 07:52:03 +02:00
be178dffc6 feat(zaatar): allow unfree 2021-07-06 22:55:48 +02:00
934a5840df fix(printing): remove dependency on main user 2021-07-06 22:54:18 +02:00
199ccf7537 feat(zaatar): +traadfri +printer -spotifyd 2021-07-06 22:51:20 +02:00
e479ea36ec feat(weechat): add binaergewitter 2021-06-26 20:49:10 +02:00
b8f8e97df1 feat(streams): fix malayalam 2021-06-26 10:14:03 +02:00
5e6baef3d2 feat(streams): add more 2021-06-26 09:50:11 +02:00
008db3167d feat(cage): open spotify 2021-06-26 09:01:07 +02:00
2cbf412f27 feat(streams): remove broken radio streams 2021-06-26 09:00:53 +02:00
f1021be262 feat(nextcloud): enable client 2021-06-22 14:10:34 +02:00
bed819219c fix: remove krebspaste, bepasty-client-cli 2021-06-22 11:38:31 +02:00
0a21d0434c chore: update 2021-06-22 10:33:58 +02:00
5e34212f5b fix(engiadina): move to a directory that is not deleted on startup 2021-06-17 21:10:44 +02:00
01925ed0ff feat(traadfri): update 2021-06-17 21:10:20 +02:00
1311b64824 feat(mpd-fm): update 2021-06-17 07:37:19 +02:00
2b85e37fb6 fix(wifi): only use wlp3s0 on machines where it applies 2021-06-16 22:00:20 +02:00
6fb75ace21 feat(weechat): run oper when connecting to irc.r 2021-06-16 13:41:22 +02:00
72135addb0 chore: update 2021-06-16 13:06:24 +02:00
1ebf7d6cec feat(traadfri): update 2021-06-16 13:04:55 +02:00
27442da13d feat(matterbridge): bye bye freenode 2021-06-16 13:04:55 +02:00
5f0b0beb94 fix(i3status-rust): limit vax percentage length 2021-06-14 12:45:24 +02:00
52fd14c4fb feat: print diff before deploying 2021-06-13 09:31:32 +02:00
b33a64796c feat(unicodmenu): update symbols 2021-06-13 09:20:58 +02:00
2a761efc90 feat(telegram bots): get proverb bot from telebots 2021-06-12 17:09:10 +02:00
f320afd838 fix(telegram bots): update nachtischsatan to use new bot library version 2021-06-12 15:11:56 +02:00
345fd8159c feat(python): install poetry 2021-06-12 14:59:53 +02:00
daef8b79d4 feat(telegram bots): update 2021-06-12 14:59:53 +02:00
6cdfdaf703 feat(wifi): add interfaces 2021-06-10 20:32:58 +02:00
eca981e5c9 Revert "fix(fetchWallpaper)"
This reverts commit d23d443cc5.
2021-06-10 20:13:32 +02:00
2fee6ae34b chore: update 2021-06-10 20:06:00 +02:00
6c96c792f0 feat(i3status-rust): add vaccination quota indicator 2021-06-10 20:02:45 +02:00
70414128e5 feat(radio): add index html 2021-06-09 12:14:43 +02:00
d480eff8cd fix(spotifyd): hand-craft spotifyd module 2021-06-09 11:49:15 +02:00
d23d443cc5 fix(fetchWallpaper) 2021-06-09 01:25:00 +02:00
1131da55ce fix(flameshot): configurate with nix 2021-06-07 15:34:26 +02:00
f5882d1577 fix(spotifyd): config type 2021-06-07 11:04:39 +02:00
39917e0bf6 feat(moodle-dl): reintegrate module in niveum 2021-06-06 13:15:01 +02:00
6727673dcf chore: update 2021-06-06 12:57:23 +02:00
2b2290841b fix: replace flameshot-once by regular flameshot 2021-06-06 08:08:40 +02:00
179b526214 chore: update much 2021-06-06 00:01:53 +02:00
8894fb2a27 fix: take stockholm from krebsco.de 2021-06-05 18:13:08 +02:00
ed97c13314 fix: flameshot-once 2021-06-05 17:45:18 +02:00
cd0874f093 chore: update 2021-06-05 17:44:54 +02:00
d67f501452 fix(libcoap): re-enable traadfri 2021-06-03 09:44:01 +02:00
118dcf3046 feat: add nixpkgs-mozilla via krops 2021-06-02 18:14:28 +02:00
7154c84cdc feat(pls): simplify info output 2021-06-02 18:14:28 +02:00
94f0299a75 chore: upgrade to 21.05 2021-06-02 08:57:18 +02:00
69354bbd3a feat: add nur via krops 2021-06-02 08:57:18 +02:00
e6b761da34 fix(devanagari): use nodejs version 2021-06-01 22:42:09 +02:00
724ac3aa99 fix(pls) 2021-06-01 22:12:45 +02:00
8880e6814c fix(meteo): curl -L 2021-06-01 19:43:29 +02:00
bee54c5f0b feat(wallpaper): set berlin 2021-06-01 19:05:53 +02:00
a5e1ef0a77 feat(weechat): ignore nick changes 2021-06-01 19:04:16 +02:00
8b1dc82eae feat: stream links 2021-05-31 21:54:57 +02:00
e830c87763 chore: update 2021-05-31 06:43:10 +02:00
6079c109f9 fix(makanek): use sqlite json to simplify dump script 2021-05-30 17:30:13 +02:00
d74b261897 fix(hedgedoc): use shortid for backup file name 2021-05-30 14:49:54 +02:00
fa192a3977 feat(hedgedoc): add backup script 2021-05-30 13:11:13 +02:00
fd38db79c0 fix(hedgedoc): reset state 2021-05-30 12:11:13 +02:00
06eda7cb6f feat(weechat): sasl for hackint and libera 2021-05-30 00:16:22 +02:00
543ea247ed feat(weechat): enable mouse 2021-05-30 00:16:22 +02:00
742018dab0 feat: latexrun 2021-05-27 10:06:04 +02:00
8a8a4aae67 feat(weechat): bye bye freenode @realrasengan 2021-05-25 21:20:23 +02:00
e521a82246 feat(scripts): remove IRC client from pls :( 2021-05-25 21:18:51 +02:00
78f490cdfb chore: update 2021-05-25 12:44:03 +02:00
b5905f886a feat(weechat): move #nixos-de to hacking #nixos 2021-05-23 08:57:38 +02:00
f1ce023eca feat(weechat): move #flipdot to libera 2021-05-22 22:50:23 +02:00
13793d3263 feat(wallpaper): dont center on berlin 2021-05-21 13:41:14 +02:00
99a8ecf876 fix(telegram-bots): set TLG bot time to 9:30
the server is set to PST/PDT (Irvine, California) so the new day begins at 9:00 CET/CEST
2021-05-21 10:01:13 +02:00
6a3add22ed feat(mpv-radio): use dmenu 2021-05-21 08:41:04 +02:00
83fb13d541 feat(telegram-bots): add bot for ancient greek word of the day 2021-05-21 08:25:03 +02:00
e34aecaa66 feat(weechat,matterbridge): add #krebs on hackint 2021-05-20 20:04:43 +02:00
000091f910 chore: update 2021-05-20 13:26:27 +02:00
c68895cbb8 feat(weechat): add libera and #fysi to it 2021-05-20 12:58:15 +02:00
295dfad33e feat(i3status-rust): add netdevice indicator 2021-05-18 21:02:45 +02:00
0f6d9bdc66 feat(makanek): install python that sshuttle can run 2021-05-18 20:16:58 +02:00
dcd7a9a4f6 feat(wifi): add AA 2021-05-18 18:45:12 +02:00
51ca66c383 feat: install recht 2021-05-17 07:09:24 +02:00
574fded6e2 fix(traadfri): living room id 2021-05-17 07:08:02 +02:00
bdb9220df6 feat: scanned script 2021-05-13 21:57:03 +02:00
aac96c00bf feat(pulseaudio): add bluetooth module 2021-05-10 09:23:09 +02:00
97e61f6eb1 feat(i3status-rust): remove incidence block 2021-05-10 06:01:47 +02:00
3cb211c682 feat(wifi): add fritzbox 2021-05-07 19:30:33 +02:00
a133f2bb3d feat: install pdfpc 2021-05-05 14:39:00 +02:00
7b617aecd8 feat(i3status-rust): update incidence rate hourly to not lag behind 2021-05-05 10:57:16 +02:00
9f38cc3850 fix(engiadina): dont delete CDN on boot 2021-05-05 09:25:48 +02:00
e62e28ffb1 fix: import nixpkgs-unstable correctly 2021-05-04 17:30:16 +02:00
d3b2ce8277 feat(version): simplify code 2021-05-04 12:20:02 +02:00
30b4c6354f feat(weechat): ##myengadin -> #fysi 2021-05-04 12:19:49 +02:00
7c88a16a32 feat(wallpaper): use berlin-centered wallpaper map 2021-05-04 10:29:25 +02:00
60dc5a9629 feat: provide a unified parallel interface to niveum- scripts 2021-05-04 09:55:10 +02:00
29da1f50cf fix(weechat): use correct nixpkgs-unstable 2021-05-04 09:30:49 +02:00
14cc0ac6aa chore: update 2021-05-04 07:41:21 +02:00
80e91d1685 chore: add nixpkgs-unstable as krops source 2021-05-03 15:06:29 +02:00
c17b611af5 chore(nixpkgs-unstable): update 2021-05-03 14:13:20 +02:00
c85b73a874 feat(i3status-rust): round down incidence since thats what counts 2021-05-03 06:40:06 +02:00
ff49bb95a7 feat(i3status-rust): incidence with region name 2021-05-03 06:08:22 +02:00
3a21680812 feat: 256color + countdown + pdf-ocr.sh 2021-05-02 18:56:41 +02:00
4f962778b7 feat(worldradio): comment 2021-05-02 18:55:54 +02:00
4006c36f9b feat(wallpaper): add stars 2021-05-02 18:55:29 +02:00
eb521b2e0e fix(candyman): allow multiple arguments 2021-05-02 18:50:32 +02:00
f178daaffd feat(i3status-rust): incidence 2021-05-02 18:50:10 +02:00
f23e644417 feat(moodle-dl): dont send errors 2021-05-02 18:49:24 +02:00
0f432025ad feat(niveum-deploy): only deploy clean working directories
this makes niveum-version always display accurate information
2021-04-28 16:10:50 +02:00
7f009cfd08 feat: menu-calc (also for i3), nix-index 2021-04-27 21:56:44 +02:00
94cdfa3ea3 chore: update 2021-04-26 12:03:37 +02:00
e75348e1cb feat(scripts): depend on iconv package 2021-04-26 11:20:34 +02:00
e13e421b75 feat(ssh): add fysi machines 2021-04-21 11:56:59 +02:00
a3fa195089 feat(weechat): filter sars-cov 2021-04-21 11:51:52 +02:00
35192198a7 feat(wifi): readd o2-WLAN66 2021-04-21 11:51:38 +02:00
b93f4a49e0 fix(engiadina): dont delete cdn directory 2021-04-19 20:02:10 +02:00
9a4b9946cb chore: update 2021-04-17 10:07:51 +02:00
9955d05152 feat(manakish): prompt color green, automatically set xrandr and pulseaudio profiles 2021-04-17 10:07:42 +02:00
141d5db610 fix(khal): fix date/time formats 2021-04-17 09:26:48 +02:00
a4edbfd29d feat(seafile): no onw need seafile-shared 2021-04-13 15:09:19 +02:00
6f7d5eadbf feat(moodle-dl): more courses 2021-04-13 15:09:05 +02:00
1d6d8f8249 feat(khal): add todoman, standardize datetime formats 2021-04-12 18:18:28 +02:00
901ab8d6b0 feat(moodle-dl): more courses 2021-04-12 18:17:45 +02:00
5249d6ab0d feat(moodle-dl): more courses 2021-04-12 11:10:31 +02:00
9a00809a2d feat(mail): run muchsync even when mbsync fails 2021-04-12 11:01:34 +02:00
376a2e115c fix(seafile): start in bg 2021-04-12 08:03:29 +02:00
aac1a2e813 feat(moodle-dl): more courses 2021-04-10 21:32:29 +02:00
28ef523c82 feat(streams): comment 2021-04-10 14:33:17 +02:00
c672260930 feat(moodle-dl): init for borsfaye 2021-04-10 14:33:06 +02:00
5cc34626e1 feat(moodle-dl): more courses 2021-04-10 13:37:53 +02:00
9f1f73ad21 chore: update 2021-04-09 20:49:13 +02:00
5fdb612033 feat(moodle-dl): add first ss21 courses 2021-04-09 15:45:50 +02:00
508bc908ce fix(hu-berlin): make cifs mounts depend on openvpn instead of fortinet 2021-04-09 08:21:47 +02:00
4cba5a0b8a feat: friendship ended with todo.txt 2021-04-08 20:00:54 +02:00
71b5a8cb24 feat: ncmpcpp-zaatar 2021-04-08 19:52:37 +02:00
200bff8386 feat: ncpamixer 2021-04-08 19:49:57 +02:00
79fd340f82 feat(mpd-fm): remove http streaming, not using it since mpv-radio 2021-04-08 19:25:37 +02:00
69ed97a4ab feat(mpd-fm): open mpd port to local network, removing the need for a password 2021-04-08 19:25:05 +02:00
ebbbb537c3 feat(streams): comment 2021-04-08 12:01:30 +02:00
556255ac8b feat(mpd-fm): add streams as playlist for use with MPD clients 2021-04-08 11:59:53 +02:00
6516c5c9b7 feat(mpd-fm): allow network access with password 2021-04-08 11:59:30 +02:00
b5d32d3962 feat(khard): sync all calendars, dont deduce calendar from birthdays 2021-04-08 11:58:25 +02:00
766874a226 feat: khard, vdirsyncer service 2021-04-07 22:55:42 +02:00
2e9386a6c2 fix(hu-berlin): disable fortinet vpn
it was messing up my dns every time i woke up from suspend
2021-04-07 22:38:45 +02:00
9af10ecf46 feat: calcurse -> khal 2021-04-07 20:43:19 +02:00
bd200b655d feat(scripts): meteo 2021-04-07 09:45:36 +02:00
4adf8fea0a feat: use pkgs.formats for everything 2021-04-07 09:37:57 +02:00
0f0b5658be feat(seafile): declaratively configure 2021-04-07 09:19:00 +02:00
4f8f3751f4 feat(weechat): add ##fysitech 2021-04-06 16:56:31 +02:00
5b76c1439f feat(i3status-rust): autolocate weather block 2021-04-05 10:08:01 +02:00
3e684ae24a fix(moodle-dl): match syncthing with new moodle-dl user 2021-04-05 09:55:05 +02:00
83afa6174a chore: update 2021-04-05 09:54:53 +02:00
0d483bfc0c feat: enable xdg 2021-04-05 08:33:11 +02:00
dea9c3f0ed feat: glow 2021-04-05 08:32:31 +02:00
f8b452901f feat: openweathermap tool and i3status block 2021-04-05 08:32:14 +02:00
80143fee87 feat(mpd-fm): run on pulseaudio 2021-04-03 15:02:01 +02:00
834e5d9ef3 chore(moodle-dl): update module 2021-04-03 15:02:01 +02:00
121d5e242f feat(matterbridge): strip markdown from messages to IRC 2021-04-01 20:15:07 +02:00
b9748964d0 feat(weechat): add flix 2021-04-01 20:14:48 +02:00
4ab7d0d92e feat(scripts): mpv-radio 2021-04-01 11:00:28 +02:00
08ada6b818 feat: add engiadina development server 2021-03-30 23:20:21 +02:00
a128813990 feat(moodle-dl): use module and package from nixpkgs fork 2021-03-30 23:20:02 +02:00
5eaee95ba1 feat: update krops and ease toum deployment 2021-03-30 23:18:56 +02:00
5eba5b84f1 feat(urlwatch): indogermanistik 2021-03-30 12:25:12 +02:00
2a8495a92c chore: update 2021-03-28 19:51:36 +02:00
5e62f0363d fix(scripts): +x rfc 2021-03-24 20:26:38 +01:00
1c8c210f06 feat(weechat): less colors 2021-03-24 20:26:23 +01:00
48ce381be0 fix(spotifyd): run correctly with systemWide pulseaudio 2021-03-24 20:26:05 +01:00
777f24e37e feat(pulseaudio): use nixos module for network sink, publish via zeroconf 2021-03-24 20:25:48 +01:00
78a50e9ae3 feat(weechat): more colors 2021-03-23 21:00:48 +01:00
b8967c8e5c feat: tmpfiles.d helper function 2021-03-23 21:00:30 +01:00
e3f3e4045a feat(pulseaudio): sink zaatar 2021-03-23 20:28:08 +01:00
08ce7749b5 fix(i3status-rust): use correct week number (week number of year) 2021-03-23 19:39:08 +01:00
d7adefc289 feat(wifi): add OF 2021-03-23 19:38:48 +01:00
7472eb5028 fix(weechat): only use kmein as nick 2021-03-23 19:38:37 +01:00
f85a8d2737 feat(streams): add more candidates 2021-03-23 19:38:21 +01:00
9724cdda54 feat: install more utils 2021-03-23 19:38:21 +01:00
6727df461d chore: update 2021-03-19 16:57:49 +01:00
0f11a9398f feat(i3): sans serif, cyan for focus 2021-03-17 17:22:14 +01:00
db07d68a60 feat(chromium): goodbye lastpass, hello bitwarden 2021-03-17 09:55:46 +01:00
f4c8094ad8 fix(praesenzlehre): dont get stuck on digit separators like 1,200 2021-03-16 11:27:31 +01:00
04247c6ca1 chore(nextcloud): update to 21 2021-03-16 11:27:05 +01:00
d99399009c feat(.bin): brockman cli 2021-03-15 08:45:00 +01:00
19c1f7c50d feat(streams): add more radio stations 2021-03-12 13:52:18 +01:00
a983ce13f8 feat(streams): add more radio stations 2021-03-11 19:10:01 +01:00
b6fa1fc274 chore: update 2021-03-11 19:09:48 +01:00
68e60b93ff feat(scripts): pimp rfc script 2021-03-11 10:26:19 +01:00
3aabeea2c3 chore: import lieferando script 2021-03-11 09:37:38 +01:00
74c6fcd3a5 feat: add worldradio script to manakish and wilde 2021-03-11 09:35:22 +01:00
392ef95c4f feat(wallpaper): use krebs wallpaper 2021-03-11 09:35:02 +01:00
5869807936 feat(scripts): unicodmenu 2021-03-06 22:24:02 +01:00
e2a0ba3eed feat(fonts): change to roboto to support more characters 2021-03-05 10:42:48 +01:00
25c6f97693 chore: update 2021-03-05 10:42:48 +01:00
12698d9f48 feat(scripts): mail-reply, much-current-query 2021-03-03 19:03:59 +01:00
5dccdfee83 chore: add .bin scripts 2021-03-03 17:23:53 +01:00
8420a2435d feat(scripts): enhance pls script 2021-03-03 17:22:26 +01:00
ed732b3a65 feat(matterbridge): disable for ##myengadin 2021-03-03 12:02:01 +01:00
cbb676bf00 chore: organize battery, steam and praesenzlehre into imports 2021-02-28 08:01:51 +01:00
74b102e55e chore: update 2021-02-27 21:31:52 +01:00
c14f5925e2 feat(manakish): steam 2021-02-27 21:31:46 +01:00
9a7b6b020a fix(makanek): run praesenzlehre daily 2021-02-27 17:51:59 +01:00
68338c2791 feat(urlwatch): watch hu semester to notify when new catalogue comes out 2021-02-24 17:58:01 +01:00
e74f9b6bd0 fix(praesenzlehre): run less frequently 2021-02-23 20:53:01 +01:00
a17201c28d fix(mail): run muchsync from master, sync to wilde and manakish 2021-02-23 20:52:39 +01:00
2a94899db5 chore: update 2021-02-23 20:51:02 +01:00
bae1cb485c chore: update 2021-02-20 19:01:47 +01:00
7f6e00a309 fix(wilde): dont disable docker 2021-02-20 18:18:16 +01:00
2a5ea9700b feat(makanek): upgrade praesenzlehre to timer 2021-02-20 18:18:16 +01:00
8b5bfd236d feat(makanek): run praesenzlehre-berlin.de liveticker 2021-02-18 13:50:13 +01:00
8302b1d9fb feat(weechat): new channels 2021-02-18 13:49:00 +01:00
8f66163c39 fix(urlwatch): move from makanek to zaatar because tellonym is blocked there 2021-02-16 12:57:21 +01:00
7ad02f75a9 feat(weechat): oper on news.r, filter experts more expertly 2021-02-15 21:47:43 +01:00
2f3d4fb3b1 feat(urlwatch): tellonym 2021-02-15 21:47:43 +01:00
005da63416 feat(weechat): ignore more greek variant spellings 2021-02-14 22:47:00 +01:00
beaf6c81e4 feat(weechat): ignore infections 2021-02-14 20:31:06 +01:00
7c67d3f88a feat(radio): handle POST for skipping meddl 2021-02-14 18:49:20 +01:00
0d20cded25 feat(weechat): never listen to "experts" 2021-02-14 11:22:30 +01:00
6c1e8368a1 fix(radio): dont fail when cropping playlist non possible pre-start 2021-02-14 11:21:56 +01:00
ac1a7ac37e feat(scripts): infschmv 2021-02-14 11:21:30 +01:00
85a6001b53 fix(matterbridge): change nick delimiter
this prevents mumble from interpreting the nick as an html tag
2021-02-14 11:21:14 +01:00
4e107f3df7 chore: update 2021-02-14 11:20:32 +01:00
37880ae746 feat(weechat): enable relay for android, improve covid filter 2021-02-09 20:56:32 +01:00
155722a8cd fix(matterbridge): ping nick 2021-02-09 10:06:03 +01:00
73d71498c7 fix(matterbridge): change nick delimiter
this enables weechat colorize_nicks support
2021-02-08 13:07:54 +01:00
e9b5c2623d fix(mpv): dont force window, change swallowing alias to smpv 2021-02-08 13:06:42 +01:00
ddc4ca0db4 feat(weechat): add channels, freenode via ssl 2021-02-08 08:16:52 +01:00
8fbaed35f8 feat(scripts): add google translate script 2021-02-08 08:16:04 +01:00
87042f5409 feat(mpd-fm): rename config file 2021-02-07 22:04:41 +01:00
a9b1a03af1 feat(weechat): install colorize_nicks and autosort scripts 2021-02-07 22:03:24 +01:00
010d620b76 feat(mail): server settings in variables 2021-02-07 22:00:32 +01:00
18033c0e54 chore: home-manager from nix-community 2021-02-07 18:45:01 +01:00
5cdf3637a5 feat(weechat): add flipdot to freenode 2021-02-07 18:22:22 +01:00
9192fa458b feat(mail): split into fetcher and client machines 2021-02-07 16:08:11 +01:00
40472e2ff8 feat(flix): add simpsons script 2021-02-06 14:24:50 +01:00
a592947bbf fix(weechat): move bouncer from toum to makanek and make stateless 2021-02-06 14:24:50 +01:00
444336cd19 fix(telegram-bots): move from toum to makanek 2021-02-06 11:54:06 +01:00
6ef578d644 feat(hu-berlin): update vpn certs and make vpns contradict each other 2021-02-06 11:17:13 +01:00
8e19069d4c chore: move kierán.de streams 2021-02-04 18:40:22 +01:00
42df0dc7df feat: add dictionary scripts 2021-02-04 18:40:11 +01:00
d6c10df13e feat(radio): add status page for lyrik 2021-02-04 15:19:16 +01:00
8cbbb4b50d feat(radio): serve html of current song 2021-02-03 11:13:31 +01:00
bc23d7ac24 feat: clean up radio streams 2021-02-02 09:23:42 +01:00
40f31fa316 feat: add more radio streams 2021-02-02 09:08:49 +01:00
f73d8725c4 feat(power-action): suspend <= 7 % 2021-02-02 09:08:29 +01:00
97fc0f82bf feat: add more radio streams 2021-02-01 23:22:41 +01:00
ef3d6c4eaf fix(toum): disable hass 2021-02-01 14:44:26 +01:00
c6d7dbe787 chore: update 2021-02-01 14:44:13 +01:00
b9149c8d9a chore: meddl -> radio 2021-01-31 13:55:41 +01:00
36502ecfd8 feat: lyrikline and lyrik (from youtube) stream 2021-01-31 13:54:52 +01:00
43fd4bbf19 feat: stream meddl to radio.kierán.de 2021-01-31 10:08:09 +01:00
37e851cc50 feat(zaatar): add wake news 2021-01-30 20:25:57 +01:00
018f79f88d feat(makanek): host drachenlord radio and stream from zaatar
the streaming links from antenne-asb.ga serve OGG but they say they
serve MP3. so mpd gets confused.
therefore regularly fetches song urls from antenne-asb.ga, queues, and
broadcasts them.
2021-01-30 20:24:43 +01:00
6843ac90b5 feat(pls): notify in irc channel 2021-01-27 09:56:46 +01:00
afb69bf334 feat(zaatar): add kiosk for controlling the radio 2021-01-27 09:19:21 +01:00
ea57f539b0 feat(zaatar): stream mpd via http, proxy control panel and stream via nginx 2021-01-27 09:13:29 +01:00
3d10ac09ab fix(streams): orthography 2021-01-27 08:21:12 +01:00
38f088d9e5 feat(zaatar): clean up mpd 2021-01-27 00:03:32 +01:00
422f2b8676 feat(zaatar): mpd.fm 2021-01-26 23:05:19 +01:00
7c1ca72a29 feat(zaatar): no need for ncmpcpp when using mpd-fm 2021-01-26 23:04:22 +01:00
f171284b71 feat: script for handling lassulus radio 2021-01-26 23:01:31 +01:00
ca50ba931a fix: use stable nix to avoid ETag error 2021-01-26 23:00:16 +01:00
63ad607d46 feat: power-action to suspend on low battery 2021-01-26 22:59:57 +01:00
e553f1bcda feat(zaatar): remove kiosk, use windows instead of panes on music tmux 2021-01-25 18:39:06 +01:00
8923f7a2c9 chore: update 2021-01-25 18:38:29 +01:00
07024df1c9 feat(zaatar): add worldradio 2021-01-23 17:12:08 +01:00
cb9bcf2d1d feat(playlists): caster-fm shortcut 2021-01-23 17:11:33 +01:00
7aeda72026 feat(playlists): add antenne asb 2021-01-23 14:05:58 +01:00
95c93cc565 feat(traadfri): add desk 2021-01-21 09:58:51 +01:00
c9979de250 feat(zaatar): run audio control tmux session 2021-01-20 07:53:46 +01:00
7889d56b99 feat(i3): add @lassulus kaomoji to emoji menu 2021-01-20 07:53:46 +01:00
03be9636ad fix: disable dpms and blanking 2021-01-20 07:53:46 +01:00
5d36ed4cd6 fix: disable nextcloud client 2021-01-20 07:53:46 +01:00
c33446aee3 chore: update 2021-01-20 07:53:46 +01:00
fe7744bedb feat: pup 2021-01-20 07:53:46 +01:00
9673e9d3e8 feat(haskell): ormolu 2021-01-15 18:37:37 +01:00
5175f3f819 feat: use newest zoom-us 2021-01-15 14:09:06 +01:00
5923f3341a fix(nextcloud): force ssl, otherwise the acme challenge wont work 2021-01-15 14:08:45 +01:00
901cf6f711 fix: codimd -> hedgedoc 2021-01-15 10:05:12 +01:00
859e536159 chore: update (remove firefox temporarily) 2021-01-13 10:07:14 +01:00
4ea18d0152 feat(wifi): update filli 2021-01-06 22:09:39 +01:00
c7c7017070 fix(much): arrow keys 2021-01-06 22:09:29 +01:00
7c80f160db fix(retiolum): dont reload on change 2021-01-01 11:58:16 +01:00
6fce803c70 chore: update 2021-01-01 11:55:05 +01:00
a6bff424b0 feat(nix): enable flakes 2021-01-01 02:48:37 +01:00
d61b17c656 Revert "feat(matterbridge): add nixos-rc3 bridge"
This reverts commit 9c1bf37d50c481ffbbe252da7ee1cf2ed3620628.
2021-01-01 02:46:30 +01:00
cbdf8ef038 feat(wifi): add vodafone-8012 2021-01-01 02:46:30 +01:00
876dbe785b feat(mime): set pcmanfm as file manager, and libreoffice as office 2021-01-01 02:46:30 +01:00
fb4a14a6bf feat(matterbridge): add nixos-rc3 bridge 2021-01-01 02:46:30 +01:00
02977ea936 feat: replace xournal by &++ 2021-01-01 02:46:30 +01:00
dcca34d5c1 feat(hu-berlin): hu-ip script 2021-01-01 02:46:30 +01:00
8bd8ec611f fix(htop): dont show threads 2020-12-22 09:29:13 +01:00
96a67a937e feat(retiolum): update tinc module to add hosts declaratively 2020-12-21 14:49:45 +01:00
fb85c29651 fix(retiolum): depend on palos retiolum again 2020-12-20 19:45:36 +01:00
3344af5339 feat: pcmanfm instead of nautilus 2020-12-20 19:22:15 +01:00
fdfd8a687f feat(neovim): add vim as wrapper, so that ghci can find it 2020-12-20 19:21:44 +01:00
e804da180d chore: update 2020-12-20 19:21:18 +01:00
2af8e1aa86 fix(spotifyd): always restart 2020-12-20 19:21:09 +01:00
10224de58a feat(hu-berlin): add network filesystems 2020-12-18 10:27:34 +01:00
2bf095c553 feat(tinc): reaload if changed (stolen from @Mic92) 2020-12-16 22:25:27 +01:00
a7d994abe7 feat: devanagari script 2020-12-16 22:25:04 +01:00
680997fb12 feat(i3): change klem to Meta+F12 2020-12-16 22:24:50 +01:00
a2d1ab6f53 feat(wallpaper): use lassulus worldmap with astronomy 2020-12-16 22:24:32 +01:00
52761a13e2 feat(wallpaper): use lassulus worldmap 2020-12-15 17:28:41 +01:00
98f7de9680 fix(mpv): only watch best quality 2020-12-14 07:45:08 +01:00
72f04f9391 feat: disable xautolock, lock only manually 2020-12-13 20:08:26 +01:00
10ad21a39c chore: update 2020-12-13 09:40:58 +01:00
5c9e25f27a fix(todo.txt): dont respect git repos 2020-12-12 17:36:19 +01:00
4b563ddf00 feat(vim): add nim.vim 2020-12-12 17:35:28 +01:00
d041e6fa52 feat(mail): meinhaki 2020-12-11 18:43:54 +01:00
8749646101 fix: aliases 2020-12-11 18:43:41 +01:00
960311c65f feat(matterbridge): rename irc bot to ponte 2020-12-03 10:09:44 +01:00
a70f05239a feat(moodle-dl): download descriptions 2020-12-03 10:09:01 +01:00
d716e5716f feat: hc 2020-12-03 10:08:47 +01:00
2781930ecf feat: access ympd via nginx with password auth 2020-11-25 10:07:26 +01:00
f34a938968 feat(git): auto stash on merge and rebase 2020-11-24 08:49:21 +01:00
080439604b feat(playlists): add youtube lo-fi 2020-11-24 08:45:59 +01:00
72df03fbf6 chore: format 2020-11-24 08:45:41 +01:00
b799e7c26f feat: remove exa
sometimes, seldomly, it failed. but an `ls` should never(!) fail
2020-11-24 08:45:41 +01:00
2a450e2f36 feat(moodle-dl): sync via syncthing instead of sshfs 2020-11-23 15:29:39 +01:00
485e07ec9e feat(i3): move windows around quicker 2020-11-23 11:59:10 +01:00
dcf3452353 feat(playlists): reactivate di.fm 2020-11-23 11:58:36 +01:00
edc8e83594 feat(moodle-dl): sync via syncthing instead of sshfs 2020-11-23 11:58:24 +01:00
01bc8178ad chore: update 2020-11-23 11:57:35 +01:00
eff303a854 feat(urlwatch): give up tellonym 2020-11-20 07:48:31 +01:00
bc992a170c feat(moodle): watch FSR, improve format 2020-11-20 07:47:49 +01:00
78e9bedcb4 feat(moodle-dl): change telegram formatting 2020-11-18 00:08:54 +01:00
d5cdbf3795 feat(matterbridge): bridge mumble and move to makanek 2020-11-18 00:07:30 +01:00
bcb5949e15 fix(toum): use 1G swapfile 2020-11-17 22:17:41 +01:00
dd61883648 feat: use starry wallpapers 2020-11-17 17:39:42 +01:00
1d7a432bec feat(urlwatch): no footer, tellonym 2020-11-17 14:06:13 +01:00
0e7652ff46 chore: resize fonts 2020-11-17 14:05:52 +01:00
a96c0d9ab3 feat(urlwatch): only watch dlf article 2020-11-16 21:02:23 +01:00
208 changed files with 9644 additions and 2054 deletions

38
.bin/256color Executable file
View File

@@ -0,0 +1,38 @@
#! /bin/sh
set -euf
pl() {
for i in $(seq $1 $(expr $2 - 1)); do
printf '\e[38;5;%sm%03i\e[m ' $i $i
done
printf '\e[38;5;%sm%03i\e[m\n' $2 $2
}
p() {
printf '\e[38;5;%sm%03i\e[m ' $1 $1
}
pn() {
printf '\e[38;5;%sm%03i\e[m\n' $1 $1
}
p6x6() {
for i in $(seq 0 5); do
for j in $(seq 0 5); do
p $(expr $1 + $i + $j \* 6)
done
echo
done
}
pl 0 7
pl 8 15
p6x6 16
p6x6 52
p6x6 88
p6x6 124
p6x6 160
p6x6 196
pl 232 243
pl 244 255

24
.bin/browser Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
open $1
else
cat <<usage
Usage: browser
pipe html to a browser
$ echo '<h1>hi mom!</h1>' | browser
$ ron -5 man/rip.5.ron | browser
usage
fi
else
f="/tmp/browser.$RANDOM.html"
cat /dev/stdin > $f
xdg-open $f
fi

46
.bin/bvg.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/sh
interesting="U6 N6 140 M46 184 N84"
curl -sSL 'https://www.bvg.de/disruption-reports/q' \
--data-raw '{"variables":{},"query":"{
allDisruptions {
disruptions {
meldungsId
linie
verkehrsmittel
__typename
... on Traffic {
datum
gueltigVonDatum
gueltigVonZeit
gueltigBisDatum
gueltigBisZeit
richtungName
richtungHafasId
beginnAbschnittName
beginnAbschnittHafasId
endeAbschnittName
endeAbschnittHafasId
textIntUrsache
sev
textIntAuswirkung
umfahrung
textWAPSMSUrsache
textWAPSMSAuswirkung
prioritaet
__typename
}
}
__typename
}
}"}' \
| jq --arg interesting "$interesting" '
.data.allDisruptions.disruptions
| map(select(
(.linie as $linie
| $interesting
| split(" ")
| index($linie))
and (.["__typename"] == "Traffic")
))
'

25
.bin/candyman Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
set -efu
usage() {
echo >&2 "$0 add-{reddit,telegram,youtube,twitch,twitter} NAME"
exit 1
}
candyman() {
curl -fsSv http://news.r/api -H content-type:application/json -d "$(jq -n "
{
command: \"PRIVMSG\",
params: [\"#all\", \"candyman: $1 $2\"]
}
")"
}
[ $# -ge 2 ] || usage
case "$1" in
add-reddit|add-telegram|add-youtube|add-twitter|add-twitch)
candyman "$@"
;;
*) usage;;
esac

13
.bin/countdown Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env -S awk -f
function z() {
getline < "/proc/uptime"
close("/proc/uptime")
return $0
}
BEGIN {
x = z()
while (1) {
y = z()
printf "%02d:%05.2f\r", (y - x) / 60, (y - x) % 60
}
}

14
.bin/csv2json Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import csv
import json
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--delimiter", "-d", default=",", help="CSV field separator")
args = parser.parse_args()
if __name__ == "__main__":
json.dump(list(csv.DictReader(sys.stdin, delimiter=args.delimiter)), sys.stdout)

7
.bin/elm-publish-private Executable file
View File

@@ -0,0 +1,7 @@
#! /usr/bin/env nix-shell
#! nix-shell -p "(import <nixpkgs> { overlays = [ (import ~/work/fysiweb/engiadina-pwa/devops/pkgs) ]; }).elm-publish-private"
#! nix-shell -i bash
set -efux
exec elm-publish-private "$@"

34
.bin/horoscope.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
set -efu
# Berlin: -d lodeg=13 -d lomin=22 -d losec=41 -d lodir=E -d ladeg=52 -d lamin=27 -d lasec=42 -d ladir=N -d usecoords=1 \
# Kassel: -d lodeg=9 -d lomin=32 -d losec=5 -d lodir=E -d ladeg=51 -d lamin=18 -d lasec=17 -d ladir=N -d usecoords=1 \
[ $# -eq 1 ] || {
echo >&2 Usage: "$0" TIMESTAMP
exit 1
}
export TZ=UTC
chart_path="$(mktemp /tmp/chart_XXX.pdf)"
timestamp="$1"
year="$(date -d "@$timestamp" +%Y)"
month="$(date -d "@$timestamp" +%m)"
day="$(date -d "@$timestamp" +%d)"
hour="$(date -d "@$timestamp" +%H)"
minute="$(date -d "@$timestamp" +%M)"
curl -sSL 'https://edifyingfellowship.org/astro/' \
-d lodeg=9 -d lomin=32 -d losec=5 -d lodir=E -d ladeg=51 -d lamin=18 -d lasec=17 -d ladir=N -d usecoords=1 \
-d ybyr="$year" -d ybmo="$month" -d ybdy="$day" -d ybhr="$hour" -d ybmi="$minute" -d ybsc=0 -d ybtz="$TZ" \
-d currenttime=0 \
-d title="$timestamp" \
-d options[]=VancouverWheel -d options[]=Arrow -d options[]=XBold -d options[]=HouseLabels -d options[]=Placidus \
-d options[]=Sun -d options[]=Moon -d options[]=Mercury -d options[]=Venus -d options[]=Mars -d options[]=Jupiter -d options[]=Saturn -d options[]=Uranus -d options[]=Neptune -d options[]=Pluto -d options[]=Ascendant -d options[]=MC -d options[]=Lilith -d options[]=MeanNode -d options[]=TrueNode \
-d aspectpct=100 -d format=PDF -d Submit= -o "$chart_path"
zathura "$chart_path"

24
.bin/json2csv Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env python3
import csv
import json
import sys
if __name__ == "__main__":
json_list = json.load(sys.stdin)
if not isinstance(json_list, list):
print("JSON object is not a list.", file=sys.stderr)
sys.exit(1)
if len(json_list) == 0:
print("JSON list is empty.", file=sys.stderr)
sys.exit(1)
keys = set()
for element in json_list:
if isinstance(element, dict):
keys |= element.keys()
else:
print("Non-dict element:", element, file=sys.stderr)
sys.exit(1)
writer = csv.DictWriter(sys.stdout, fieldnames=list(keys))
writer.writeheader()
for element in json_list:
writer.writerow(element)

15
.bin/libib.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
session_id=7b638c194d9bda74f80043045018cc9e
declare -A libraries
libraries["Literatur"]=344428
libraries["Sprache"]=344160
libraries["Miscellanea"]=344427
libraries["Wissenschaft"]=344429
libraries["Relicta"]=565920
for library in ${!libraries[@]}
do
curl -sSL 'https://www.libib.com/library/functions/csv-export.php' -H "Cookie: PHPSESSID=$session_id" -d export="${libraries[$library]}" > "$library.csv"
done

81
.bin/lieferando.sh Normal file
View File

@@ -0,0 +1,81 @@
#!/bin/sh
set -efu
if echo "$1" | grep -Eq '[[:digit:]]{5}'; then
PLZ="$1"
else
echo >&2 "Usage: $0 PLZ"
exit 1
fi
lieferando_dir=/tmp/lieferando
mkdir -p "$lieferando_dir/$PLZ"
fetch_restaurants() {
cache_path="$lieferando_dir/$PLZ.json"
if [ -r "$cache_path" ]; then
cat "$cache_path"
else
w3m -dump_source "http://www.lieferando.de/$PLZ" \
| gunzip \
| sed -n '/var restaurants/,/];$/p' \
| sed 's/var restaurants =//;$s/;$//' \
| prettier --parser=json \
| jq '
map({
name: .[30] | .name,
category: .[30] |.categories | split(", "),
url: "http://lieferando.de\(.[30] | .url)",
minutes: .[19],
minimum: .[10],
delivery: .[14]
})' \
| tee "$cache_path"
fi
}
fetch_menu() {
[ $# -eq 1 ] || exit 1
slug="$(echo "$1" | sed 's!.*/!!')"
cache_path="$lieferando_dir/$PLZ/$slug.json"
if [ -r "$cache_path" ]; then
cat "$cache_path"
else
w3m -dump_source "$1" \
| gunzip \
| sed -n '/var MenucardProducts/,/\];/p' \
| sed 's/var MenucardProducts =//;s/;$//' \
| jq -r '
unique_by(.productId)
| group_by(.categoryId)
| flatten
' \
| tee "$cache_path"
fi
}
data="$(fetch_restaurants)"
# echo "$data" | jq -c '.[]' | while read -r restaurant; do
# fetch_menu "$(echo "$restaurant" | jq -r .url)"
# done
selected_categories="$(echo "$data" | jq -r 'map(.category) | flatten | unique | .[]' | fzf -m)"
selected_restaurant_url="$(echo "$selected_categories" | jq --argjson restaurants "$data" -sRr '
split("\n")[:-1] as $categories
| $restaurants[]
| select(.category - $categories != .category)
| "\(.name) [🚴\(.minutes)min 💰\(.minimum)€ + \(.delivery)€] (\(.url))"
' \
| fzf \
| sed 's/.*(//;s/)$//'
)"
fetch_menu "$selected_restaurant_url" \
| jq -r '.[] | "\(.price)\t\(.name)"' \
| fzf -m \
| awk '{print $0; sum += $1} END {print "-----"; print sum}'

17
.bin/lit.awk Normal file
View File

@@ -0,0 +1,17 @@
BEGIN {
if (!comment) comment = "--";
if (!begin) begin = "\\begin{code}";
if (!end) end = "\\end{code}";
}
{
if ($0 == begin) {
code = 1;
print comment, $0;
} else if ($0 == end) {
code = 0;
print comment, $0;
} else {
if (code) print $0;
else print comment, $0;
}
}

3
.bin/mail-current-part Executable file
View File

@@ -0,0 +1,3 @@
#! /bin/sh
set -efu
exec curl -fSs --unix-socket /tmp/much.api.sock http://localhost/current/part

View File

@@ -0,0 +1,27 @@
#! /bin/sh
# usage: mail-current-query-find-part-by-name NAME
set -efu
name=$1
query=$(mail-current-query)
result=$(notmuch show --entire-thread=false --format=json "$query")
part_id=$(printf %s "$result" | jq --arg name "$name" '
[
recurse |
select(type == "object") |
{ id, name: .filename } |
select(.id != null and .name != null)
] |
map(select(.name == $name))[0].id
')
if test "$part_id" = null; then
printf 'error: could not find part with name %s\n' \
"$name" \
>&2
exit 1
fi
exec notmuch show --part="$part_id" "$query"

View File

@@ -0,0 +1,39 @@
#! /bin/sh
# usage: mail-current-query-find-part-by-type TYPE
set -efu
type=$1
query=$(mail-current-query)
result=$(notmuch show --entire-thread=false --format=json "$query")
part_id=$(printf %s "$result" | jq --arg type "$type" '
#flatten|map(select(.!=null))[0].body[0] |
#
#if .["content-type"] == $type then
# .id
#elif .["content-type"] | test("^multipart/") then
# .content|map(select(.["content-type"]==$type))[0].id
#else
# null
#end
[
recurse |
select(type == "object") |
{ id, type: .["content-type"] } |
select(.id != null and .type != null)
] |
map(select(.type == $type))[0].id
')
if test "$part_id" = null; then
printf 'error: could not find part with type %s\n' \
"$type" \
>&2
exit 1
fi
exec notmuch show --part="$part_id" "$query"

23
.bin/pdf-ocr.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p poppler_utils tesseract4
set -eu
pdf_path="$(realpath "$1")"
[ -f "$pdf_path" ] || {
echo "Usage: $0 FILE.pdf" >&2
exit 1
}
tmpdir="$(mktemp -d)"
trap 'rm -rf $tmpdir' EXIT
cd "$tmpdir"
pdftoppm -png "$pdf_path" pdf-ocr
for png in pdf-ocr*.png; do
tesseract "$png" "$png.txt" 2>/dev/null
done
cat pdf-ocr-*.txt

2
.bin/playlist_entries.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
youtube-dl -ij "$*" | jq -sr '.[] | .webpage_url'

17
.bin/proxies.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
curl -sSL https://www.netzwelt.de/proxy/index.html \
| pup ".tblc" \
| xml-to-json /dev/stdin \
| jq '
.div.table.tbody.tr
| map(
.td
| {
ip: .[0].a.value,
port: .[1],
country: .[2] | (if type == "string" then . else .a.value end),
security: .[3],
protocol: .[4]
}
)
'

4
.bin/readme Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
curl -sSL "https://raw.githubusercontent.com/$*/master/README.md" \
| pandoc -f gfm -t man -s \
| man -l -

6
.bin/sample-pdf.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
filepath="$(shuf --head-count=1)"
pages="$(pdfinfo "$filepath" | awk '/^Pages:/{print $2}')"
random_page="$(shuf --input-range="1-$pages" --head-count=1)"
zathura --page="$random_page" "$filepath"

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ result
.envrc
.history
.todo
node_modules

12
.gitmodules vendored
View File

@@ -1,3 +1,9 @@
[submodule "submodules/much"]
path = submodules/much
url = git@github.com:kmein/much
[submodule "submodules/menstruation-telegram"]
path = submodules/menstruation-telegram
url = https://github.com/kmein/menstruation-telegram
[submodule "submodules/menstruation-backend"]
path = submodules/menstruation-backend
url = https://github.com/kmein/menstruation.rs
[submodule "submodules/nur-packages"]
path = submodules/nur-packages
url = git@github.com:kmein/nur-packages.git

View File

@@ -1,9 +1,10 @@
{
"url": "https://github.com/rycee/home-manager.git",
"rev": "63f299b3347aea183fc5088e4d6c4a193b334a41",
"date": "2020-11-03T23:11:32+01:00",
"path": "/nix/store/8ivnh2bjbnyl3aisb83f9z18pgwsca4l-home-manager",
"sha256": "0iksjch94wfvyq0cgwv5wq52j0dc9cavm68wka3pahhdvjlxd3js",
"url": "https://github.com/nix-community/home-manager.git",
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
"date": "2021-12-19T00:59:29+01:00",
"path": "/nix/store/fb46bv10azrag2jjlzhil6j11f4x8glw-home-manager",
"sha256": "1c8gxm86zshr2zj9dvr02qs7y3m46gqavr6wyv01r09jfd99dxz9",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

View File

@@ -1,9 +1,10 @@
{
"url": "https://cgit.krebsco.de/krops",
"rev": "55aa2c77ce8183f3d2b24f54efa33ab6a42e1e02",
"date": "2020-04-19T01:06:20+02:00",
"path": "/nix/store/08wg2yrcgkr6iwipjd6g0fbwb7gacqax-krops",
"sha256": "00rvx9h596ync8wgic6xc9srzajzm28wlp9q7mv4z0jsb27l5bj8",
"rev": "cccebf3ff7a53336b3f106cb96dddd5892d427ed",
"date": "2021-03-23T22:47:37+01:00",
"path": "/nix/store/mz13xxnil35lwsf90hwnrm2agir7hb51-krops",
"sha256": "07mg3iaqjf1w49vmwfchi7b1w55bh7rvsbgicp2m47gnj9alwdb6",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

View File

@@ -0,0 +1,11 @@
{
"url": "https://cgit.krebsco.de/nix-writers",
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
"date": "2019-04-02T20:05:33+02:00",
"path": "/nix/store/wm5zhsha1a2iy0d582nlfi7604ayd1vz-nix-writers",
"sha256": "0xdivaca1hgbxs79jw9sv4gk4f81vy8kcyaff56hh2dgq2awyvw4",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -0,0 +1,11 @@
{
"url": "https://github.com/mozilla/nixpkgs-mozilla",
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
"date": "2021-12-07T09:28:33-05:00",
"path": "/nix/store/pqwcw589i2y2w2116wn3ifl834adjsa0-nixpkgs-mozilla",
"sha256": "1a71nfw7d36vplf89fp65vgj3s66np1dc0hqnqgj5gbdnpm1bihl",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,7 +1,11 @@
{
"url": "https://github.com/NixOS/nixpkgs.git",
"rev": "0ead6f8cfd461c3a366c8bc9893037afd89f798d",
"date": "2020-10-27T18:30:26+01:00",
"sha256": "170kziw7bxfm4mwi8q5c2vdpayml0mini4zyxagbvbivivdj5hla",
"fetchSubmodules": false
"rev": "f01adc7b35a8f80e82f3466e6d873b8b9c8f1b28",
"date": "2021-12-22T23:05:28+01:00",
"path": "/nix/store/zhfrvg77dzpc3hq02v9zv20dfgqwpzk6-nixpkgs",
"sha256": "17iyf2iiizi7c1wr71day3wvgalbkkm2zgc9lpy7y42rl4frq9sf",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,9 +1,10 @@
{
"url": "https://github.com/NixOS/nixpkgs.git",
"rev": "3090c65041104931adda7625d37fa874b2b5c124",
"date": "2020-11-12T23:28:38+01:00",
"path": "/nix/store/24r9bgxbja9kcss0iwklbhsvc26r5km7-nixpkgs",
"sha256": "0r0gfsvvh69cy39izrgqhqlj26hxdqf37n3is6b6pma75k97axsj",
"rev": "9ab7d12287ced0e1b4c03b61c781901f178d9d77",
"date": "2021-12-21T10:09:48+01:00",
"path": "/nix/store/minmlh0avkwvvc3p7flhpbglp13kr585-nixpkgs",
"sha256": "0bbd2pgcyavqn5wgq0xp8p67lha0kv9iqnh49i9w5fb5g29q7i30",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

View File

@@ -1,9 +1,10 @@
{
"url": "https://github.com/krebs/retiolum",
"rev": "fa920e75bccc0c4e6b52904f1e6b9c1f71dc352b",
"date": "2020-11-09T10:32:11+01:00",
"path": "/nix/store/n3zq1yvwq7f3xq2crgni4841k9idgfmj-retiolum",
"sha256": "1k83p0y6xj1bb9zzsxsng5nvd82imf241d5f8krn3ffjy9a0b48g",
"rev": "b72b0a987767b587c79cba8499b5114d69fceeef",
"date": "2021-12-28T19:46:45+00:00",
"path": "/nix/store/kyaqwf89v6id9mda92x4b0hf778j987x-retiolum",
"sha256": "19hjzzlfk1m9ign33w4ppqgmg23v7c6k8l0fm7f33spq8982w7rb",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

View File

@@ -1,9 +1,10 @@
{
"url": "https://github.com/kmein/stockholm",
"rev": "f0325bef7954cb946674050847c6d52112cb658f",
"date": "2020-11-11T07:45:58+01:00",
"path": "/nix/store/lka6fhjfbwdx9bc7lk1bz4gizdv7nrbm-stockholm",
"sha256": "0gbw6n5yq36ysc30afa5d2dbsl2d46f73ms6f0rprdbr4nhdw8l2",
"url": "https://cgit.lassul.us/stockholm",
"rev": "576c05cf3a0ceddefa29c2d0073108177c3cfa52",
"date": "2021-12-22T13:59:46+01:00",
"path": "/nix/store/yx1j5pardgd9114f0cf3c4xjfq6r4yfv-stockholm",
"sha256": "18napi4k8i2iizrismlp9ha3ga6c3n2dvrhijy59kl1jxqrsaq9l",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

10
README.md Normal file
View File

@@ -0,0 +1,10 @@
# niveum
> [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.)
>
> 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.—
>
> 2. Transf., _snow-white, snowy_ (mostly poet.): a similitudine sic: Corpore niveum candorem, aspectu igneum ardorem assequebatur, Auct. Her. 4, 33, 44: lacerti, Verg. A. 8, 387: lac, id. E. 2, 20: hanc si capite niveae agnae exorari judicas, Sen. Q. N. 2, 36: Briseis niveo colore, Hor. C. 2, 4, 3: vestis, Ov. M. 10, 432: candidior nivei folio, Galatea, ligustri, id. ib. 13, 789: dens, id. H. 18, 18: quā notam duxit niveus videri, Hor. C. 4, 2, 59: panis, Juv. 5, 70: flumen, _clear, pellucid_, Sen. Hippol. 504: undae, Mart. 7, 32, 11: tribuni, _clothed in white togas_, Calp. Ecl. 7, 29; so, Quirites, Juv. 10, 45.
## Pressestimmen
> das ist ja pure poesie —[xkey](https://github.com/riotbib)

View File

@@ -1,46 +1,45 @@
{ pkgs, lib, config, ... }:
let
inherit (import <niveum/lib>) colours;
colourNames =
[ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
colourPairs = lib.getAttrs colourNames colours;
alacrittyConfig = {
background_opacity = 0.9;
colors = {
primary = { inherit (colours) background foreground; };
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
font = {
normal.family = "Monospace";
size = 8;
};
key_bindings = [
{
key = "Add";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
];
};
in {
{
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
pkgs.alacritty
];
home-manager.users.me.xdg.configFile = {
"alacritty/alacritty.yml".text = builtins.toJSON alacrittyConfig;
home-manager.users.me.xdg.configFile =
let
inherit (import <niveum/lib>) colours;
colourNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
colourPairs = lib.getAttrs colourNames colours;
in {
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
background_opacity = 0.9;
colors = {
primary = { inherit (colours) background foreground; };
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
font = {
normal.family = "Monospace";
size = 6;
};
key_bindings = [
{
key = "Plus";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
];
};
};
}

17
configs/battery.nix Normal file
View File

@@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
boot.extraModulePackages = with config.boot.kernelPackages; [
tp_smapi
acpi_call
];
boot.kernelModules = [ "tp_smapi" "acpi_call" ];
environment.systemPackages = [ pkgs.tpacpi-bat ];
services.tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 80;
STOP_CHARGE_THRESH_BAT0 = 95;
};
};
}

11
configs/beets.nix Normal file
View File

@@ -0,0 +1,11 @@
{ lib, pkgs, ... }:
{
environment.systemPackages = [ pkgs.beets ];
home-manager.users.me.xdg.configFile = {
"beets/config.yaml".source = (pkgs.formats.yaml {}).generate "config.yaml" {
directory = "~/cloud/syncthing/music";
library = "~/cloud/syncthing/common/music.db";
plugins = toString [ "fetchart" "lastgenre" ];
};
};
}

View File

@@ -1,7 +1,7 @@
{ pkgs, lib, ... }: {
hardware.bluetooth = {
enable = true;
config.General.Enable =
settings.General.Enable =
lib.concatStringsSep "," [ "Source" "Sink" "Media" "Socket" ];
};

57
configs/bvg.nix Normal file
View File

@@ -0,0 +1,57 @@
{ pkgs, lib, ... }:
let
inherit (import <niveum/lib>) serveHtml;
stations = [
900068204 # A/M
900068302 # KAS
900068203 # B-P
];
fahrplan = pkgs.writeText "fahrplan.html" ''
<!DOCTYPE html>
<title>Fahrplan</title>
<link
rel="icon"
type="image/x-icon"
href="https://mobil.bvg.de/Fahrinfo/img/ua_xhtml/logo.gif"
/>
<style>
body {
margin: 0;
--bvg-yellow: #f0d722;
}
#fahrplan {
display: flex;
height: 100vh;
width: 100%;
flex-direction: row;
}
#fahrplan iframe {
flex-grow: 1;
border: none;
}
#fahrplan iframe + iframe {
border-left: 2px solid var(--bvg-yellow);
}
</style>
<body>
<div id="fahrplan">
${lib.concatMapStrings (station: ''
<iframe scrolling="no" src="https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1&input=${toString station}&boardType=depRT&start=yes"></iframe>
'') stations}
</div>
</body>
'';
in
{
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
services.nginx.virtualHosts."bvg.kmein.r" = {
locations."/".extraConfig = serveHtml fahrplan pkgs;
};
}

View File

@@ -1,44 +0,0 @@
{ pkgs, lib, ... }:
{
environment.systemPackages = [ pkgs.calcurse ];
systemd.services.caldav-sync = {
enable = true;
wants = [ "network-online.target" ];
startAt = "*:0/15";
serviceConfig.User = "kfm";
script = "${pkgs.calcurse}/bin/calcurse-caldav";
};
home-manager.users.me = {
home.file = {
".calcurse/conf".text = ''
appearance.calendarview=monthly
appearance.layout=1
daemon.enable=no
daemon.log=no
format.inputdate=4
format.outputdate=%F
general.confirmquit=no
general.confirmdelete=yes
general.firstdayofweek=monday
appearance.theme=default on default
'';
".calcurse/caldav/config".text = lib.generators.toINI {} {
General = {
Binary = "${pkgs.calcurse}/bin/calcurse";
Hostname = "posteo.de:8443";
Path = "/calendars/kieran.meinhardt/default/";
InsecureSSL = "No";
DryRun = "No";
Verbose = "Yes";
};
Auth = {
Username = "kieran.meinhardt@posteo.net";
Password = lib.strings.fileContents <secrets/mail/posteo>;
};
};
};
};
}

View File

@@ -2,7 +2,7 @@
programs.chromium = {
enable = true;
extensions = [
"hdokiejnpimakedhajhdlcegeplioahd" # LastPass
"nngceckbapebfimnlniiiahkandclblb" # BitWarden
# "ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
# "fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin

View File

@@ -1,14 +1,4 @@
{ config, lib, pkgs, ... }: {
imports = [
<niveum/modules/seafile.nix>
<niveum/modules/dropbox.nix>
];
niveum = {
dropbox.enable = true;
seafile.enable = true;
};
system.activationScripts.home-symlinks = ''
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
@@ -19,31 +9,46 @@
services.nextcloud-client.enable = true;
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "book" ''
set -efu
book="$({
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/syncthing/library -type f
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/Seafile/Books -type f
} | ${pkgs.fzf}/bin/fzf)"
${pkgs.zathura}/bin/zathura "$book"
'')
];
fileSystems."/media/moodle" = {
device = "zaatar.r:/moodle";
fsType = "nfs";
options = [
"x-systemd.idle-timeout=600"
"noauto"
"x-systemd.automount"
];
};
services.syncthing = rec {
enable = true;
user = "kfm";
openDefaultPorts = true;
configDir = "/home/kfm/.config/syncthing";
dataDir = "/home/kfm/.config/syncthing";
declarative = rec {
cert = toString <system-secrets/syncthing/cert.pem>;
key = toString <system-secrets/syncthing/key.pem>;
devices = {
wilde.id =
"R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
heym.id =
"HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
manakish.id =
"AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
};
folders =
let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing";
in {
"${syncthing-dir}/common".devices = [ "wilde" "manakish" ];
"${syncthing-dir}/library".devices = lib.attrNames devices;
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices;
"${syncthing-dir}/music".devices = lib.attrNames devices;
cert = toString <system-secrets/syncthing/cert.pem>;
key = toString <system-secrets/syncthing/key.pem>;
inherit ((import <niveum/lib>).syncthing) devices;
folders =
let cloud-dir = "${config.users.users.me.home}/cloud";
in {
"${cloud-dir}/syncthing/common".devices = [ "kabsa" "manakish" ];
"${cloud-dir}/syncthing/library".devices = [ "kabsa" "manakish" "heym" ];
"${cloud-dir}/syncthing/mundoiu".devices = [ "kabsa" "manakish" "heym" ];
"${cloud-dir}/syncthing/music" = {
devices = [ "kabsa" "manakish" "heym" "zaatar" ];
id = "music";
};
};
};
};
}

View File

@@ -1,25 +0,0 @@
{
services.nginx.virtualHosts."pad.xn--kiern-0qa.de" = {
enableACME = true;
addSSL = true;
locations."/".extraConfig = ''
client_max_body_size 4G;
proxy_set_header Host $host;
proxy_pass http://localhost:3091;
'';
};
services.codimd = {
enable = true;
configuration = {
allowAnonymous = false;
allowGravatar = false;
db = {
dialect = "sqlite";
storage = "/var/lib/codimd/db.codimd.sqlite";
useCDN = false;
};
port = 3091;
};
};
}

37
configs/copyq.nix Normal file
View File

@@ -0,0 +1,37 @@
{ config, pkgs, ... }:
let
copyqConfig = pkgs.writers.writeDash "copyq-config" ''
${pkgs.copyq}/bin/copyq config check_clipboard true
${pkgs.copyq}/bin/copyq config check_selection false
${pkgs.copyq}/bin/copyq config copy_clipboard true
${pkgs.copyq}/bin/copyq config copy_selection false
${pkgs.copyq}/bin/copyq config activate_closes true
${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
${pkgs.copyq}/bin/copyq config clipboard_tab \&clipboard
${pkgs.copyq}/bin/copyq config disable_tray false
${pkgs.copyq}/bin/copyq config hide_tabs false
${pkgs.copyq}/bin/copyq config hide_toolbar false
${pkgs.copyq}/bin/copyq config item_popup_interval true
${pkgs.copyq}/bin/copyq config maxitems 1000
${pkgs.copyq}/bin/copyq config move true
${pkgs.copyq}/bin/copyq config text_wrap true
'';
in {
environment.systemPackages = [ pkgs.copyq ];
systemd.user.services.copyq = {
wantedBy = [ "graphical-session.target" ];
environment = {
DISPLAY = ":${toString config.services.xserver.display}";
};
serviceConfig = {
SyslogIdentifier = "copyq";
ExecStart = "${pkgs.copyq}/bin/copyq";
ExecStartPost = copyqConfig;
Restart = "always";
RestartSec = "15s";
StartLimitBurst = 0;
};
};
}

View File

@@ -1,32 +1,23 @@
{ pkgs, lib, config, options, ... }:
{ inputs, pkgs, lib, config, options, ... }:
let
inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses kieran;
in {
imports = [
<home-manager/nixos>
<niveum/modules/system-dependent.nix>
../modules/system-dependent.nix
{
boot.supportedFilesystems = [ "ntfs" ];
}
{
nix.nixPath = [
"/var/src"
"nixpkgs-overlays=${toString ../overlays}"
];
}
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
{
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/aea85375c7a82297d977904de8dd7f41baf2d59a.tar.gz") {
inherit pkgs;
};
writeDashBin = pkgs.writers.writeDashBin;
writeDash = pkgs.writers.writeDash;
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
@@ -34,19 +25,14 @@ in {
};
overlays = [
(self: super: {
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
scripts = import <niveum/packages/scripts> { pkgs = super; inherit lib; };
})
(import <niveum/overlays/toml.nix>)
(import <stockholm/krebs/5pkgs/haskell>)
(import <stockholm/submodules/nix-writers/pkgs>)
(import <stockholm/krebs/5pkgs/override>)
];
};
}
{
boot.cleanTmpDir = true;
boot.loader.timeout = 1;
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
}
{
home-manager.users.me = {
@@ -70,19 +56,35 @@ in {
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
isNormalUser = true;
uid = 1000;
};
home-manager.users.me.xdg.enable = true;
home-manager.users.me.dconf.enable = false;
}
{
sound.enable = true;
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull; # for bluetooth sound output
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
zeroconf.discovery.enable = true;
extraConfig = ''
load-module ${toString [
"module-tunnel-sink-new"
"server=zaatar.r"
"sink_name=zaatar"
"channels=2"
"rate=44100"
]}
'';
};
users.users.me.extraGroups = [ "audio" ];
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer pkgs.pulsemixer ];
environment.systemPackages = [ pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer ];
}
{
environment.interactiveShellInit =
@@ -103,29 +105,27 @@ in {
cat = "${pkgs.bat}/bin/bat --style=plain";
chromium-incognito =
"chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
cp = "cp -i";
dig = "dig +short";
cp = "cp --interactive";
ip = "${pkgs.iproute}/bin/ip -c";
l = "${pkgs.exa}/bin/exa -s type -a";
la = "${pkgs.exa}/bin/exa -s type -la";
ll = "${pkgs.exa}/bin/exa -s type -l";
ls = "${pkgs.exa}/bin/exa -s type";
mv = "mv -i";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
mv = "mv --interactive";
nixi = "nix repl '<nixpkgs>'";
ns = "nix-shell --run zsh";
o = "${pkgs.xdg_utils}/bin/xdg-open";
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
rm = "rm -i";
rm = "rm --interactive";
s = "${pkgs.systemd}/bin/systemctl";
take = "source ${take}";
tmux = "${pkgs.tmux}/bin/tmux -2";
tree = "${pkgs.exa}/bin/exa --tree";
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
us = "${pkgs.systemd}/bin/systemctl --user";
wcd = "source ${wcd}";
weechat = "${pkgs.openssh}/bin/ssh weechat@toum -t screen -x weechat-screen";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
where = "source ${where}";
yt =
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
@@ -134,7 +134,6 @@ in {
};
}
{ i18n.defaultLocale = "en_GB.UTF-8"; }
{ services.illum.enable = true; }
{
services.xserver = {
enable = true;
@@ -155,24 +154,32 @@ in {
}
{
security.wrappers = {
pmount.source = "${pkgs.pmount}/bin/pmount";
pumount.source = "${pkgs.pmount}/bin/pumount";
pmount = {
owner = "root";
group = "users";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
owner = "root";
group = "users";
source = "${pkgs.pmount}/bin/pumount";
};
};
}
{ programs.command-not-found.enable = true; }
{
programs.gnupg.agent.enable = true;
environment.systemPackages = [
pkgs.gnupg
(pkgs.pass.withExtensions (e: [e.pass-otp]))
environment.systemPackages = [
pkgs.gnupg
(pkgs.pass.withExtensions (e: [e.pass-otp]))
];
}
{
services.atd.enable = true;
}
{
services.mingetty = {
services.getty = {
greetingLine = lib.mkForce "";
helpLine = lib.mkForce "";
};
@@ -185,15 +192,16 @@ in {
}
./alacritty.nix
./bash.nix
./beets.nix
./bluetooth.nix
./ccc.nix
./kleiter.nix
./calcurse.nix
# ./kleiter.nix
./khal.nix
./chromium.nix
./cloud.nix
./copyq.nix
./compton.nix
./direnv.nix
./distrobump.nix
./docker.nix
./dunst.nix
./flix.nix
@@ -205,37 +213,38 @@ in {
./htop.nix
./hu-berlin.nix
./i3.nix
./keybase.nix
./keyboard.nix
./mail.nix
./lb.nix
./mpv.nix
./mime.nix
./nano.nix
./neovim.nix
./neomutt.nix
./nix.nix
./newsboat.nix
./flameshot-once.nix
./packages
./power-action.nix
./printing.nix
./openweathermap.nix
./wallpaper.nix
./redshift.nix
./retiolum.nix
./rofi.nix
./spacetime.nix
./seafile.nix
./ssh.nix
./sshd.nix
./sudo.nix
./sxiv.nix
./theming.nix
./tmux.nix
./tor.nix
./todo-txt.nix
# ./tor.nix
./traadfri.nix
./unclutter.nix
./version.nix
./vscode.nix
./watson.nix
./wifi.nix
./xautolock.nix
./zsh.nix
];
}

View File

@@ -11,8 +11,7 @@ let
cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [];
shellHook = "export HISTFILE=''${toString ./.history}";
buildInputs = [];
}
EOF
''${EDITOR:-vim} shell.nix

View File

@@ -1,10 +0,0 @@
{ lib, config, pkgs, ... }: {
imports = [
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
inherit lib config;
pkgs = pkgs // { writeDash = pkgs.writers.writeDash; };
})
];
makefu.distrobump.enable = false;
}

View File

@@ -1,5 +1,12 @@
{ pkgs, ... }: {
virtualisation.docker.enable = true;
{ lib, pkgs, ... }: {
virtualisation.docker = {
enable = true;
# for ICE wifi, ref https://gist.github.com/sunsided/7840e89ff4e11b64a2d7503fafa0290c
extraOptions = lib.concatStringsSep " " [
"--bip=172.39.1.5/24"
"--fixed-cidr=172.39.1.0/25"
];
};
users.users.me.extraGroups = [ "docker" ];
environment.systemPackages = [ pkgs.docker pkgs.docker_compose ];
}

View File

@@ -8,7 +8,7 @@ in {
settings = {
global = {
transparency = 10;
font = "Monospace 7";
font = "Monospace 8";
geometry = "200x5-30+20";
frame_color = colours.foreground;
follow = "mouse";

View File

@@ -1,12 +1,11 @@
{ lib, pkgs, ... }:
let
inherit (import <niveum/lib>) defaultApplications;
flameshot-once =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
in {
nixpkgs.overlays = [
(self: super: {
xwaitforwindow =
write =
super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> { };
})
];
@@ -19,7 +18,7 @@ in {
deleteUrl = "http://p.r/image/delete/%1";
xdg-open.browser = (defaultApplications pkgs).browser;
};
config.timeout = 200;
config.timeout = 1000;
})
];
}

View File

@@ -5,6 +5,7 @@ let
indexFilename = "index";
flixUser = "flix";
flixGroup = "users";
inherit (import <niveum/lib>) tmpfilesConfig;
in {
fileSystems.${flixLocation} = {
device = "prism.r:/export";
@@ -24,7 +25,13 @@ in {
};
systemd.tmpfiles.rules = [
"d '${cacheLocation}' 0750 ${flixUser} ${flixGroup} - -"
(tmpfilesConfig {
type = "d";
path = cacheLocation;
mode = "0750";
user = flixUser;
group = flixGroup;
})
];
systemd.services.flix-index = {
@@ -44,11 +51,21 @@ in {
isSystemUser = true;
createHome = true;
home = cacheLocation;
extraGroups = [ flixGroup ];
group = flixGroup;
};
environment.systemPackages = [
(pkgs.writeDashBin "flixmenu" ''
(pkgs.writers.writeDashBin "mpv-simpsons" ''
set -efu
cd "${flixLocation}/download"
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
cat "${cacheLocation}/${indexFilename}" \
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
| shuf \
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
'')
(pkgs.writers.writeDashBin "flixmenu" ''
set -efu
cd "${flixLocation}/download"

View File

@@ -1,8 +1,12 @@
{ pkgs, ... }: {
nixpkgs.config.joypixels.acceptLicense = true;
fonts = {
enableDefaultFonts = true;
enableFontDir = true;
fontDir.enable = true;
fonts = with pkgs; [
alegreya
alegreya-sans
corefonts
eb-garamond
fira
@@ -13,6 +17,8 @@
libertine
lmodern
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
roboto-mono
roboto-slab
@@ -26,9 +32,9 @@
joypixels
];
fontconfig.defaultFonts = {
monospace = [ "JetBrains Mono" ];
serif = [ "Source Serif Pro" ];
sansSerif = [ "Source Sans Pro" ];
monospace = [ "JetBrains Mono" "JoyPixels" ];
serif = [ "Roboto Slab" ];
sansSerif = [ "Roboto" "Noto Sans" ];
emoji = [ "JoyPixels" ];
};
};

View File

@@ -76,6 +76,8 @@ in
ignores = ignorePaths;
extraConfig = {
pull.ff = "only";
rebase.autoStash = true;
merge.autoStash = true;
core.pager =
"${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX";
color = {

View File

@@ -2,10 +2,10 @@
services.gitea = {
enable = true;
disableRegistration = true;
rootUrl = "https://code.xn--kiern-0qa.de";
appName = "code.kierán.de";
rootUrl = "https://code.kmein.de";
appName = "code.kmein.de";
};
services.nginx.virtualHosts."code.xn--kiern-0qa.de" = {
services.nginx.virtualHosts."code.kmein.de" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = "proxy_pass http://localhost:3000;";

81
configs/hedgedoc.nix Normal file
View File

@@ -0,0 +1,81 @@
{ config, pkgs, ... }:
let
backupLocation = "/var/lib/codimd-backup";
stateLocation = "/var/lib/codimd/state.sqlite";
nixpkgs-unstable = import <nixpkgs-unstable> {};
domain = "pad.kmein.de";
in
{
imports = [ <stockholm/krebs/3modules/permown.nix> ];
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "https://localhost:3091";
proxyWebsockets = true;
};
};
security.acme.certs.${domain}.group = "hedgecert";
users.groups.hedgecert.members = [ "codimd" "nginx" ];
security.dhparams = {
enable = true;
params.hedgedoc = {};
};
services.hedgedoc = {
enable = true;
configuration = {
allowOrigin = [ domain ];
allowAnonymous = true;
allowGravatar = false;
allowFreeURL = true;
db = {
dialect = "sqlite";
storage = stateLocation;
};
port = 3091;
domain = domain;
useSSL = true;
protocolUseSSL = true;
sslCAPath = [ "/etc/ssl/certs/ca-certificates.crt" ];
sslCertPath = "/var/lib/acme/${domain}/cert.pem";
sslKeyPath = "/var/lib/acme/${domain}/key.pem";
dhParamPath = config.security.dhparams.params.hedgedoc.path;
};
};
krebs.permown.${backupLocation} = { owner = "codimd"; group = "codimd"; umask = "0002"; };
systemd.services.hedgedoc-backup = {
description = "Hedgedoc backup service";
script = ''
${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
| ${pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
import json
import pathlib
import sys
for note in json.load(sys.stdin):
user_directory = pathlib.Path()
if note["ownerId"]:
user_directory = pathlib.Path(note["ownerId"])
user_directory.mkdir(exist_ok=True)
file_path = user_directory / (
(note["alias"] if note["alias"] else note["shortid"]) + ".md"
)
file_path.write_text(note["content"])
print(f" {file_path}", file=sys.stderr)
''}
'';
startAt = "hourly";
serviceConfig = {
Type = "oneshot";
User = "codimd";
Group = "codimd";
WorkingDirectory = backupLocation;
};
};
}

View File

@@ -1,5 +1,5 @@
{ config, pkgs, ... }: {
imports = [ <niveum/modules/hledger.nix> ];
imports = [ ../modules/hledger.nix ];
niveum.hledger = {
enable = true;

View File

@@ -2,45 +2,28 @@
home-manager.users.me = {
programs.htop = {
enable = true;
colorScheme = 0;
accountGuestInCpuMeter = true;
cpuCountFromZero = false;
delay = 15;
detailedCpuTime = false;
headerMargin = true;
hideKernelThreads = true;
hideThreads = false;
hideUserlandThreads = false;
highlightBaseName = true;
highlightMegabytes = true;
highlightThreads = true;
shadowOtherUsers = true;
showProgramPath = false;
showThreadNames = true;
sortDescending = true;
sortKey = "PERCENT_CPU";
treeView = true;
updateProcessNames = false;
meters = {
left = [
{
kind = "LeftCPUs2";
mode = 1;
}
{
kind = "RightCPUs2";
mode = 1;
}
{
kind = "Memory";
mode = 1;
}
{
kind = "Swap";
mode = 1;
}
];
right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
settings = {
color_scheme = 0;
account_guest_in_cpu_meter = true;
cpu_count_from_zero = false;
delay = 15;
detailed_cpu_time = false;
header_margin = true;
hide_kernel_threads = true;
hide_threads = true;
hide_userland_threads = true;
highlight_base_name = true;
highlight_megabytes = true;
highlight_threads = true;
shadow_other_users = true;
show_program_path = false;
show_thread_names = false;
sort_descending = true;
sort_key = "PERCENT_CPU";
tree_view = true;
update_process_names = false;
right_meters = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
left_meters = [ "LeftCPUs2" "RightCPUs2" "Memory" "Swap" ];
};
};
};

View File

@@ -6,69 +6,74 @@ let
identity = fileContents <secrets/eduroam/identity>;
password = fileContents <secrets/eduroam/password>;
};
eduroamAuth = ''
key_mgmt=WPA-EAP
eap=TTLS
proto=RSN
identity="${eduroam.identity}"
anonymous_identity="anonymous@wlan.hu-berlin.de"
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
password="${eduroam.password}"
ca_cert="${
pkgs.fetchurl {
url =
"https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
}
}"
phase2="auth=PAP"
'';
hu-berlin-cifs-options = [
"uid=${toString config.users.users.me.uid}"
"gid=${toString config.users.groups.users.gid}"
"sec=ntlmv2"
"workgroup=german"
"username=meinhaki"
"password=${lib.strings.fileContents <secrets/mail/meinhaki>}"
"noauto"
"x-systemd.requires=openvpn-hu-berlin.service"
"x-systemd.automount"
"x-systemd.device-timeout=1"
"x-systemd.idle-timeout=1min"
];
in {
networking.wireless.networks = {
eduroam_5GHz.auth = eduroamAuth;
eduroam.auth = eduroamAuth;
fileSystems."/media/hu-berlin/germpro2" = {
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
fsType = "cifs";
options = hu-berlin-cifs-options;
};
fileSystems."/mnt/moodle" = {
device = "moodle@toum.r:/var/lib/moodle";
fsType = "fuse.sshfs";
options = [
"IdentityFile=/root/.ssh/id_rsa"
"Port=${toString sshPort}"
"_netdev"
"allow_other"
"default_permissions"
"gid=100"
"idmap=user"
# "noatime"
"noauto"
# "nodiratime"
"x-systemd.nofail"
"reconnect"
"ro"
"uid=1000"
"x-systemd.automount"
"x-systemd.device-timeout=1s"
"x-systemd.idle-timeout=1min"
"x-systemd.mount-timeout=1s"
"x-systemd.requires=tinc.retiolum.service"
"x-systemd.requires=wpa_supplicant.service"
];
fileSystems."/media/hu-berlin/germhome" = {
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
fsType = "cifs";
options = hu-berlin-cifs-options;
};
home-manager.users.me.programs.ssh = {
matchBlocks = {
"alew.hu-berlin.de" = {
user = "centos";
hostname = "141.20.187.219";
};
};
};
environment.systemPackages = [
pkgs.sshfsFuse
(pkgs.writers.writeDashBin "hu-ip" ''
${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3
'')
(pkgs.writers.writePython3Bin "hu-eduroam-install"
{
libraries = with pkgs.python3Packages; [ distro pyopenssl dbus-python ];
flakeIgnore = [ "E501" "E123" "W504" "E722" "F821" "E226" "E126" "E265" "W291" ];
}
(builtins.readFile (builtins.fetchurl {
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/linux-installer/eduroam-linux-hub.py";
sha256 = "19x2kvwxx13265b2hj5fjf53g0liw6dw7xf9j9cav67cswmz60kf";
}))
)
];
(pkgs.writers.writeDashBin "hu-vpn" ''
${pkgs.openfortivpn}/bin/openfortivpn -p "${eduroam.password}" -c ${pkgs.writeText "hu-berlin.config" ''
systemd.services.hu-vpn = {
enable = true;
wants = [ "network-online.target" ];
conflicts = [ "openvpn-hu-berlin.service" ];
script = ''
${pkgs.openfortivpn}/bin/openfortivpn -c ${pkgs.writeText "hu-berlin.config" ''
host = forti-ssl.vpn.hu-berlin.de
port = 443
trusted-cert = e5a7d56543002ffe1e8962caa5fd6d94053aa702381458247b670877a66f3c6f
trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359
username = ${eduroam.identity}
password = ${eduroam.password}
''}
'')
];
'';
};
systemd.services.openvpn-hu-berlin.conflicts = [ "hu-vpn.service" ];
services.openvpn.servers.hu-berlin = {
autoStart = false;

View File

@@ -27,6 +27,12 @@ let
"betacode" = pkgs.writers.writeDash "betacode" ''
${pkgs.scripts.betacode}/bin/betacode
'';
"devanagari" = pkgs.writers.writeDash "devanagari" ''
${pkgs.scripts.devanagari}/bin/devanagari
'';
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
};
};
@@ -37,29 +43,6 @@ let
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
'';
# https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
emoji-menu = let
emoji-file = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
sha256 = "03fv69ah8msh2j6i3lm4sdkckqq8jwn1kj43j98dh0xjpzazsy46";
};
in with pkgs;
writers.writeDashBin "emoji-menu" ''
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
[ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
notify-send --app-name="emoji-menu" "'$chosen' copied to clipboard." &
fi
'';
in {
services.xserver = {
displayManager.defaultSession = "none+i3";
@@ -69,10 +52,25 @@ in {
};
};
services.xserver = {
monitorSection = ''Option "DPMS" "false"'';
serverFlagsSection = ''
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
'';
extraConfig = ''
Section "Extensions"
Option "DPMS" "Disable"
EndSection
'';
};
home-manager.users.me.xsession.windowManager.i3 = {
enable = true;
config = rec {
fonts = [ "Monospace 10" ];
fonts = {names = ["Sans"]; size = 10.0;};
modifier = "Mod4";
window = {
titlebar = false;
@@ -111,9 +109,9 @@ in {
};
in rec {
focused = scheme // {
border = colours.foreground;
indicator = colours.foreground;
childBorder = colours.foreground;
border = colours.cyan.bright;
indicator = colours.cyan.bright;
childBorder = colours.cyan.bright;
};
unfocused = scheme // {
border = colours.background;
@@ -134,7 +132,7 @@ in {
};
bars = [{
workspaceButtons = false;
fonts = [ "Monospace 8" ];
fonts = {names = ["Sans"]; size = 8.0;};
mode = "hide"; # "dock"
position = "bottom";
colors = rec {
@@ -148,7 +146,7 @@ in {
};
};
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
pkgs.writeTOML (import <niveum/lib/i3status-rust.nix> {
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
inherit (config.niveum) batteryName wirelessInterface;
inherit colours;
inherit pkgs;
@@ -164,17 +162,15 @@ in {
"l" = "resize grow width 10 px or 5 ppt";
};
keybindings = {
"${modifier}+Shift+h" = "move left";
"${modifier}+Shift+j" = "move down";
"${modifier}+Shift+k" = "move up";
"${modifier}+Shift+l" = "move right";
"${modifier}+Shift+h" = "move left 25 px";
"${modifier}+Shift+j" = "move down 25 px";
"${modifier}+Shift+k" = "move up 25 px";
"${modifier}+Shift+l" = "move right 25 px";
"${modifier}+h" = "focus left";
"${modifier}+j" = "focus down";
"${modifier}+k" = "focus up";
"${modifier}+l" = "focus right";
"${modifier}+Menu" = "exec ${klem}/bin/klem";
"${modifier}+Shift+b" = "move window to workspace prev";
"${modifier}+Shift+n" = "move window to workspace next";
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
@@ -186,13 +182,16 @@ in {
"${modifier}+Shift+q" = "kill";
"${modifier}+Shift+r" = "restart";
"${modifier}+Shift+s" = "sticky toggle";
"${modifier}+z" = "sticky toggle";
"${modifier}+Shift+z" = "floating toggle";
"${modifier}+s" = "scratchpad show";
"${modifier}+Shift+s" = "move scratchpad";
"${modifier}+c" = "split h";
"${modifier}+e" = "layout toggle split";
"${modifier}+f" = "fullscreen toggle";
"${modifier}+r" = "mode resize";
"${modifier}+s" = "layout stacking";
"${modifier}+v" = "split v";
"${modifier}+w" = "layout tabbed";
@@ -200,8 +199,9 @@ in {
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
"${modifier}+0" = "exec ${pkgs.scripts.menu-calc}/bin/=";
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
"${modifier}+Shift+w" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
"${modifier}+a" =
"exec --no-startup-id ${pkgs.rofi}/bin/rofi -display-window -show window";
"${modifier}+d" = "exec --no-startup-id ${pkgs.dmenu}/bin/dmenu_run";
@@ -213,7 +213,11 @@ in {
}
cd ~/notes
note_file=$(find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2 | dmenu -i)
note_file=$({
echo diary/$(date -I).md
echo diary/$(date -I -d yesterday).md
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2
} | dmenu -i)
if test "$note_file"
then
i3-sensible-terminal -e "$EDITOR" "$note_file"
@@ -221,31 +225,25 @@ in {
''
}";
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
"${modifier}+u" = "exec ${emoji-menu}/bin/emoji-menu";
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
"${modifier}+F8" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
"${modifier}+F12" = "exec ${klem}/bin/klem";
"Print" = "exec flameshot-once";
"XF86AudioLowerVolume" =
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioRaiseVolume" =
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86Calculator" =
"exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
"XF86AudioPause" =
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause";
"XF86AudioPlay" =
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioNext" =
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
"XF86AudioPrev" =
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
"XF86ScreenSaver" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86Calculator" = "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
"XF86AudioPause" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause";
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioNext" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
"XF86AudioPrev" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioStop" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl stop";
"XF86ScreenSaver" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";

View File

@@ -1,8 +0,0 @@
{ config, ... }: {
services.keybase.enable = true;
services.kbfs = {
enable = true;
mountPoint = "%h/cloud/keybase";
};
}

View File

@@ -2,8 +2,8 @@
let commaSep = builtins.concatStringsSep ",";
in {
services.xserver = {
layout = commaSep [ "de" "gr" ];
xkbVariant = commaSep [ "T3" "polytonic" ];
layout = commaSep [ "de" "gr" "ru" ];
xkbVariant = commaSep [ "T3" "polytonic" "phonetic" ];
xkbOptions =
commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
libinput.enable = true;

168
configs/khal.nix Normal file
View File

@@ -0,0 +1,168 @@
{ config, pkgs, lib, ... }:
let
davHome = "~/.local/share/dav";
kmeinCloud = {
davEndpoint = "https://cloud.xn--kiern-0qa.de/remote.php/dav";
username = "kieran";
password = lib.fileContents <secrets/nextcloud/password>;
};
fysiCloud = {
davEndpoint = "https://nextcloud.fysi.dev/remote.php/dav";
username = "kmein";
password = lib.fileContents <secrets/nextcloud-fysi/password>;
};
in
{
environment.systemPackages = [ pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman ];
systemd.user.services.vdirsyncer = {
enable = true;
wants = [ "network-online.target" ];
wantedBy = [ "default.target" ];
startAt = "*:00/10";
script = ''
${pkgs.vdirsyncer}/bin/vdirsyncer sync
${pkgs.khal}/bin/khal printcalendars # https://lostpackets.de/khal/configure.html#syncing
'';
serviceConfig = {
Type = "oneshot";
Restart = "on-failure";
};
};
home-manager.users.me = {
xdg.configFile = {
"khard/khard.conf".text = ''
[addressbooks]
[[contacts]]
path = ${davHome}/contacts/contacts/
[general]
debug = no
default_action = list
editor = ${config.environment.variables.EDITOR}
merge_editor = ${pkgs.vim}/bin/vimdiff
[contact table]
display = first_name
group_by_addressbook = no
reverse = no
show_nicknames = no
show_uids = no
sort = last_name
localize_dates = yes
preferred_phone_number_type = pref, cell, home
preferred_email_address_type = pref, work, home
[vcard]
search_in_source_files = no
skip_unparsable = no
'';
"todoman/config.py".text = ''
path = "${davHome}/calendar/*"
date_format = "%Y-%m-%d"
time_format = "%H:%M"
default_due = 0
default_list = "Personal"
startable = True
'';
"khal/config".text = ''
[calendars]
[[alew]]
path = ${davHome}/calendar/alew
color = "light gray"
[[personal]]
path = ${davHome}/calendar/personal
color = "light cyan"
[[uni]]
path = ${davHome}/calendar/uni-1
color = "yellow"
[[fysi]]
path = ${davHome}/calendar/fysi-1
color = "light magenta"
[[fysi_team]]
path = ${davHome}/calendar/personal_shared_by_fdf
color = "light red"
[[birthdays]]
path = ${davHome}/contacts/contacts
type = birthdays
color = "light green"
[default]
highlight_event_days = True
timedelta = 5d
print_new = path
default_calendar = personal
[locale]
timeformat = %H:%M
dateformat = %Y-%m-%d
longdateformat = %Y-%m-%d
datetimeformat = %Y-%m-%d %H:%M
longdatetimeformat = %Y-%m-%d %H:%M
local_timezone = ${config.time.timeZone}
default_timezone = ${config.time.timeZone}
weeknumbers = left
'';
"vdirsyncer/config".text = ''
[general]
status_path = "~/.local/share/vdirsyncer/status/"
[pair kontakte]
a = "kontakte_local"
b = "kontakte_cloud"
collections = ["contacts"]
conflict_resolution = "b wins"
[pair kalender]
a = "kalender_local"
b = "kalender_cloud"
collections = ["personal", "alew", "uni-1"]
conflict_resolution = "b wins"
[pair fysi]
a = "kalender_local"
b = "fysi_cloud"
collections = ["fysi-1", "personal_shared_by_fdf"]
conflict_resolution = "b wins"
[storage kontakte_local]
type = "filesystem"
path = "${davHome}/contacts/"
fileext = ".vcf"
[storage kalender_local]
type = "filesystem"
path = "${davHome}/calendar/"
fileext = ".ics"
[storage kontakte_cloud]
type = "carddav"
url = "${kmeinCloud.davEndpoint}/addressbooks/users/${kmeinCloud.username}/"
username = "${kmeinCloud.username}"
password = "${kmeinCloud.password}"
[storage kalender_cloud]
type = "caldav"
url = "${kmeinCloud.davEndpoint}/calendars/${kmeinCloud.username}/"
username = "${kmeinCloud.username}"
password = "${kmeinCloud.password}"
[storage fysi_cloud]
type = "caldav"
url = "${fysiCloud.davEndpoint}/calendars/${fysiCloud.username}/"
username = "${fysiCloud.username}"
password = "${fysiCloud.password}"
'';
};
};
}

View File

@@ -1,13 +0,0 @@
{ ... }:
let ssid = "Kleiter Gast";
in {
networking.wireless.networks.${ssid}.psk = "Kleiter-Gast";
# fix dns
systemd.network.networks.kleiter = {
dns = [ "8.8.8.8" "8.8.4.4" ];
networkConfig.DHCP = "yes";
matchConfig.Name = "wlp3s0";
matchConfig.SSID = ssid;
};
}

27
configs/lb.nix Normal file
View 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
'';
};
}

View File

@@ -1,245 +0,0 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) kieran;
nixpkgs-much = import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "7c2a362b58a1c2ba72d24aa3869da3b1a91d39e1";
sha256 = "0gl4xndyahasa9dv5mi3x9w8s457wl2xh9lcldizcn1irjvkrzs4";
}) {
overlays = [
(import <stockholm/krebs/5pkgs/haskell>)
];
};
much-pkg = nixpkgs-much.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
much = nixpkgs-much.haskell.lib.dontHaddock much-pkg;
tagRules = [
{
query = "to:miaengiadina-pwa@noreply.github.com AND subject:\"PR run failed\"";
tags = [ "-new" "+deleted" ];
}
{
query = lib.concatStringsSep " OR " [
"from:noreply-local-guides@google.com"
"from:google-maps-noreply@google.com"
"subject:fd-noti"
"from:nebenan.de"
"to:miaengiadina-pwa@noreply.github.com"
];
tags = [ "-new" ];
}
{
query = "tag:new";
tags = [ "-new" "+inbox" ];
}
];
# turns out we have to escape $ because, if the password contains a $, it will get interpolated as a variable by the msmtp `passwordeval` which does: `bash -c "COMMAND; echo"`
pass_ = file: "echo ${lib.escape ["$"] (lib.escapeShellArg (lib.strings.fileContents file))}";
generateTaggingScript = filters:
let
template = { tags, query, message ? "tagging ${query} -> ${lib.concatStringsSep " " tags}", ... }: ''
echo '${message}'
${pkgs.notmuch}/bin/notmuch tag ${lib.concatStringsSep " " tags} -- "${query}"
'';
in lib.concatStringsSep "\n" (map template filters);
enableDefaults = lib.recursiveUpdate {
mbsync = {
enable = true;
create = "both";
expunge = "both";
};
msmtp.enable = true;
notmuch.enable = true;
};
mail-sync = pkgs.writers.writeDashBin "mail-sync" ''
${pkgs.isync}/bin/mbsync --all
${pkgs.notmuch}/bin/notmuch new
'';
in {
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
systemd.services.mail-sync = {
enable = true;
wants = [ "network-online.target" ];
startAt = "*:0/15";
serviceConfig.User = "kfm";
serviceConfig.Type = "oneshot";
environment.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
script = ''
export PATH=${lib.makeBinPath [ pkgs.muchsync pkgs.notmuch mail-sync ]}
mail-sync
muchsync
'';
};
environment.systemPackages = [
pkgs.neomutt
pkgs.notmuch-addrlookup
mail-sync
pkgs.muchsync
(pkgs.writers.writeDashBin "mua" ''
if [ $# -eq 0 ]; then
${much}/bin/much-kmein
else
${much}/bin/much-kmein -q "$*"
fi
'')
(pkgs.writers.writeDashBin "mail-clean" ''
${pkgs.notmuch}/bin/notmuch search --output files --format=text0 tag:deleted | ${pkgs.findutils}/bin/xargs -r0 rm
${pkgs.notmuch}/bin/notmuch new
'')
];
home-manager.users.me = {
services.muchsync.remotes =
let
muchsyncConfig = host: {
name = host;
value = {
frequency = "*:0/10";
remote.host = host;
remote.checkForModifiedFiles = false;
local.checkForModifiedFiles = false;
# don't run `notmuch new` locally nor remotely because muchsync is only regularly run after `mail-sync`
remote.importNew = false;
local.importNew = false;
};
};
in lib.listToAttrs (map muchsyncConfig [
"wilde"
"manakish"
]);
programs.msmtp.enable = true;
programs.mbsync.enable = true;
programs.notmuch = {
enable = true;
new.tags = [ "new" ];
search.excludeTags = [ "deleted" "spam" ];
hooks.postNew = generateTaggingScript tagRules;
extraConfig.muchsync.and_tags = "inbox;unread";
};
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
accounts.email.accounts = {
fysi = enableDefaults {
primary = false;
smtp = {
host = "smtp.fastmail.com";
port = 465;
tls.enable = true;
};
imap = {
host = "imap.fastmail.com";
port = 993;
tls.enable = true;
};
userName = "kieran@fysi.tech";
address = "kieran@fysi.tech";
realName = kieran.name;
passwordCommand = pass_ <secrets/mail/fastmail>;
};
cock = enableDefaults {
primary = false;
smtp = {
host = "mail.cock.li";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
imap = {
host = "mail.cock.li";
port = 993;
tls.enable = true;
};
userName = "2210@cock.li";
address = "2210@cock.li";
realName = "2210";
passwordCommand = pass_ <secrets/mail/cock>;
};
kieran-gmail = enableDefaults {
primary = false;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = kieran.name;
userName = "kieran.meinhardt";
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
folders = {
drafts = "[Gmail]/Entw&APw-rfe";
sent = "[Gmail]/Gesendet";
trash = "[Gmail]/Papierkorb";
};
};
amroplay = enableDefaults {
primary = false;
flavor = "gmail.com";
address = "amroplay@gmail.com";
realName = kieran.name;
userName = "amroplay";
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
folders = {
drafts = "[Gmail]/Drafts";
sent = "[Gmail]/Sent Mail";
trash = "[Gmail]/Bin";
};
};
posteo = enableDefaults {
primary = true;
smtp = {
host = "posteo.de";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
imap = {
host = "posteo.de";
port = 993;
tls.enable = true;
};
address = "kieran.meinhardt@posteo.net";
realName = kieran.name;
userName = "kieran.meinhardt@posteo.net";
passwordCommand = pass_ <secrets/mail/posteo>;
};
hu-berlin = enableDefaults {
primary = false;
address = "meinhark@hu-berlin.de";
realName = kieran.name;
userName = "meinhark";
passwordCommand = pass_ <secrets/eduroam/password>;
smtp = {
host = "mailhost.cms.hu-berlin.de";
port = 25;
tls = {
enable = true;
useStartTls = true;
};
};
imap = {
host = "mailbox.cms.hu-berlin.de";
port = 993;
tls.enable = true;
};
};
};
};
}

View File

@@ -1,53 +1,56 @@
{ pkgs, lib, ... }:
let
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
config = {
general = {
RemoteNickFormat = "[{NOPINGNICK}] ";
Charset = "utf-8";
};
telegram.kmein.Token = bridgeBotToken;
irc.freenode = {
Server = "irc.freenode.net:6667";
Nick = "tg_bridge";
};
gateway = [
{
name = "krebs-bridge";
enable = true;
inout = [
{
account = "irc.freenode";
channel = "#krebs";
}
{
account = "telegram.kmein";
channel = "-330372458";
}
];
}
{
name = "myengadin-bridge";
enable = true;
inout = [
{
account = "irc.freenode";
channel = "##myengadin";
}
{
account = "telegram.kmein";
channel = "-425759153";
}
];
}
];
};
in
{
nixpkgs.overlays = [ (import <niveum/overlays/toml.nix>) ];
nixpkgs.overlays = [
(self: super: {
matterbridge = (import (super.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "e45d91ee65db293a172ec506759d1248e40c35f5";
sha256 = "03cjs5xcx09lw0djyrx2kfakw7gkg4iqmy9w25azai62im39l30k";
}) {}).matterbridge;
})
];
services.matterbridge = {
enable = true;
configPath = toString (pkgs.writeTOML config);
configPath =
let bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
in toString ((pkgs.formats.toml {}).generate "config.toml" {
general = {
RemoteNickFormat = "[{NICK}] ";
Charset = "utf-8";
};
telegram.kmein.Token = bridgeBotToken;
irc =
let Nick = "ponte";
in {
hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick; };
};
mumble.lassulus = {
Server = "lassul.us:64738";
Nick = "krebs_bridge";
SkipTLSVerify = true;
};
gateway = [
{
name = "krebs-bridge";
enable = true;
inout = [
{
account = "irc.hackint";
channel = "#krebs";
}
{
account = "telegram.kmein";
channel = "-330372458";
}
{
account = "mumble.lassulus";
channel = 6; # "nixos"
}
];
}
];
});
};
}

41
configs/menstruation.nix Normal file
View File

@@ -0,0 +1,41 @@
{ pkgs, lib, ... }:
let
backend = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
telegram = pkgs.callPackage <niveum/submodules/menstruation-telegram> {};
backendPort = 8000;
in
{
containers.menstruation.autoStart = true;
containers.menstruation.config = { config, pkgs, ... }: {
services.redis.enable = true;
systemd.services.menstruation-telegram = {
wants = [
"network-online.target"
"menstruation-backend.service"
"redis.service"
];
wantedBy = [ "multi-user.target" ];
environment = {
MENSTRUATION_TOKEN = lib.strings.fileContents <system-secrets/telegram/menstruation.token>;
MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}";
MENSTRUATION_MODERATORS = "18980945";
};
serviceConfig = {
Restart = "always";
DynamicUser = true;
ExecStart = "${telegram}/bin/menstruation-telegram";
};
};
systemd.services.menstruation-backend = {
wants = [ "network-online.target" ];
environment.ROCKET_PORT = toString backendPort;
serviceConfig = {
Restart = "always";
DynamicUser = true;
ExecStart = "${backend}/bin/menstruation_server";
};
};
};
}

View File

@@ -19,6 +19,7 @@
"x-scheme-handler/mailto" = "brave-browser.desktop";
"x-scheme-handler/unknown" = "brave-browser.desktop";
"x-scheme-handler/webcal" = "brave-browser.desktop";
"inode/directory" = "pcmanfm.desktop";
};
};

View File

@@ -0,0 +1,17 @@
# https://github.com/Fluepke/nix-files/blob/2be70b76a198afaa7763132fed645a3c19d5af6e/configuration/common/blackbox-exporter.yml
# https://github.com/xHain-hackspace/xhain-nixfiles/blob/0d6e3b87a07317c2d54cccabf4f90da589319e2c/common/prometheus/blackbox-exporter.yml
{
modules.http_2xx = {
http = {
fail_if_not_ssl = true;
ip_protocol_fallback = false;
method = "GET";
no_follow_redirects = false;
preferred_ip_protocol = "ip4";
valid_http_versions = [ "HTTP/1.1" "HTTP/2.0" ];
tls_config.insecure_skip_verify = true;
};
prober = "http";
timeout = "15s";
};
}

View File

@@ -0,0 +1,60 @@
{
auth_enabled = false;
server = {
http_listen_port = 3100;
grpc_listen_port = 9096;
};
ingester = {
wal = {
enabled = true;
dir = "/tmp/wal";
};
lifecycler = {
address = "127.0.0.1";
ring = {
kvstore.store = "inmemory";
replication_factor = 1;
};
final_sleep = "0s";
};
chunk_idle_period = "1h"; # Any chunk not receiving new logs in this time will be flushed
max_chunk_age = "1h"; # All chunks will be flushed when they hit this age, default is 1h
chunk_target_size = 1048576; # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
chunk_retain_period = "30s"; # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
max_transfer_retries = 0; # Chunk transfers disabled
};
schema_config.configs = [
{
from = "2020-10-24";
store = "boltdb-shipper";
object_store = "filesystem";
schema = "v11";
index = {
prefix = "index_";
period = "24h";
};
}
];
storage_config = {
boltdb_shipper = {
active_index_directory = "/tmp/loki/boltdb-shipper-active";
cache_location = "/tmp/loki/boltdb-shipper-cache";
cache_ttl = "24h"; # Can be increased for faster performance over longer query periods, uses more disk space
shared_store = "filesystem";
};
filesystem.directory = "/tmp/loki/chunks";
};
compactor = {
working_directory = "/tmp/loki/boltdb-shipper-compactor";
shared_store = "filesystem";
};
limits_config = {
reject_old_samples = true;
reject_old_samples_max_age = "168h";
};
chunk_store_config.max_look_back_period = "0s";
table_manager = {
retention_deletes_enabled = false;
retention_period = "0s";
};
}

229
configs/monitoring/pull.nix Normal file
View File

@@ -0,0 +1,229 @@
{ lib, config, pkgs, ... }:
let
lokiConfig = import ./loki.nix;
blackboxConfig = import ./blackbox.nix;
in
{
services.grafana = {
enable = true;
domain = "grafana.kmein.r";
port = 9444;
addr = "127.0.0.1";
};
services.nginx.virtualHosts.${config.services.grafana.domain} = {
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
proxyWebsockets = true;
};
};
services.prometheus.rules = let diskFreeThreshold = 10; in [(builtins.toJSON {
groups = [{
name = "niveum";
rules = [
{
alert = "ServiceDown";
expr = ''node_systemd_unit_state{state="failed"} == 1'';
annotations = {
summary = "{{$labels.job}}: Service {{$labels.name}} failed to start.";
};
}
{
alert = "RootPartitionFull";
for = "10m";
expr = ''(node_filesystem_free_bytes{mountpoint="/"} * 100) / node_filesystem_size_bytes{mountpoint="/"} < ${toString diskFreeThreshold}'';
annotations = {
summary = "{{ $labels.job }}: Filesystem is running out of space soon.";
description = ''The root disk of {{ $labels.job }} has {{ $value | printf "%.2f" }}% free disk space (threshold at ${toString diskFreeThreshold}%).'';
};
}
{
alert = "RootPartitionFullWeek";
for = "1h";
expr = ''node_filesystem_free_bytes{mountpoint="/"} ''
+ ''and predict_linear(node_filesystem_free_bytes{mountpoint="/"}[2d], 7*24*3600) <= 0'';
annotations = {
summary = "{{$labels.job}}: Filesystem is running out of space in 7 days.";
};
}
{
alert = "HighLoad";
expr = ''node_load15 / on(job) count(node_cpu_seconds_total{mode="system"}) by (job) >= 1.0'';
for = "10m";
annotations = {
summary = "{{$labels.job}}: Running on high load: {{$value}}";
};
}
{
alert = "HighRAM";
expr = "node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1";
for = "1h";
annotations.summary = "{{$labels.job}}: Using lots of RAM.";
}
{
alert = "UptimeMonster";
expr = "time() - node_boot_time_seconds > 2592000";
annotations.summary = "{{$labels.job}}: up for more than 30 days.";
}
{
alert = "HostDown";
expr = ''up == 0'';
for = "5m";
annotations = {
summary = "Host {{ $labels.job }} down for 5 minutes.";
};
}
{
alert = "Reboot";
expr = "time() - node_boot_time_seconds < 300";
annotations.summary = "{{$labels.job}}: Reboot";
}
{
alert = "ProbeFailed";
expr = "probe_success == 0";
for = "5m";
annotations.summary = "{{$labels.instance}}: probe failed";
}
{
alert = "SlowProbe";
expr = "avg_over_time(probe_http_duration_seconds[1m]) > 1";
for = "5m";
annotations.summary = "{{$labels.instance}}: HTTP probe slow";
}
{
alert = "HttpStatusCode";
expr = "probe_http_status_code != 0 AND (probe_http_status_code <= 199 OR probe_http_status_code >= 400)";
for = "5m";
annotations.summary = "{{$labels.instance}}: status code {{$value}}";
}
{
alert = "SslExpirySoon";
expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 30";
for = "5m";
annotations.summary = "{{$labels.instance}}: SSL certificate expires in 30 days";
}
{
alert = "SslExpiry";
expr = "probe_ssl_earliest_cert_expiry - time() <= 0";
for = "5m";
annotations.summary = "{{$labels.instance}}: SSL certificate has expired";
}
];
}];
})];
systemd.services.alertmanager-bot-telegram =
let
alertmanager-bot-telegram = pkgs.buildGoModule rec {
pname = "alertmanager-bot";
version = "2020-07-13";
src = pkgs.fetchFromGitHub {
owner = "metalmatze";
repo = "alertmanager-bot";
rev = "5efc0bbbf8023d4324e9da98562f064a714a7206";
sha256 = "09cciml1j8x76jpm2v5v6h2q6j1fkhsz1kswslmx8wl4wk40xgp4";
};
vendorSha256 = "1v0fgin8dn81b559zz4lqmrl7hikr46g4gb18sci4riql5qs1isj";
postInstall = ''
install -D ./default.tmpl $out/templates/default.tmpl
'';
};
in {
wantedBy = [ "multi-user.target" ];
after = [ "ip-up.target" ];
environment.TELEGRAM_ADMIN = "18980945";
environment.TELEGRAM_TOKEN = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
serviceConfig = {
DynamicUser = true;
StateDirectory = "alertbot";
ExecStart = ''${alertmanager-bot-telegram}/bin/alertmanager-bot \
--alertmanager.url=http://localhost:9093 --log.level=info \
--store=bolt --bolt.path=/var/lib/alertbot/bot.db \
--listen.addr="0.0.0.0:16320" \
--template.paths=${pkgs.writeText "template.tmpl" ''
{{ define "telegram.default" }}
{{range .Alerts -}}
{{ if eq .Status "firing" }}
<b>{{ index .Annotations "summary"}}</b>
{{ index .Annotations "description" }}
See on Grafana: http://${config.services.grafana.domain}/d/alpUteInz/niveum
{{ else -}}
RESOLVED 😌 <del>{{ index .Annotations "summary"}}</del>
{{- end }}
{{end -}}
{{end}}
''}'';
};
};
services.prometheus.alertmanager = {
enable = true;
listenAddress = "localhost";
configuration = {
route = {
group_wait = "30s";
repeat_interval = "4h";
receiver = "me";
};
receivers = [{
name = "me";
webhook_configs = [{
url = "http://localhost:16320";
send_resolved = true;
}];
}];
};
};
services.prometheus.alertmanagers = [{
scheme = "http";
path_prefix = "/";
static_configs = [ { targets = [ "localhost:9093" ]; } ];
}];
services.prometheus.scrapeConfigs = [
{
job_name = "makanek";
static_configs = [ { targets = [
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
]; } ];
}
{
scrape_interval = "5m";
job_name = "blackbox";
metrics_path = "/probe";
params.module = [ "http_2xx" ];
relabel_configs = [
{ source_labels = ["__address__"]; target_label = "__param_target"; }
{ source_labels = ["__param_target"]; target_label = "instance"; }
{ replacement = "127.0.0.1:${toString config.services.prometheus.exporters.blackbox.port}"; target_label = "__address__"; }
];
static_configs = [{
targets = [
"alew.hu-berlin.de"
];
}];
}
{
job_name = "zaatar";
static_configs = [ { targets = [ "zaatar.r:${toString config.services.prometheus.exporters.node.port}" ]; } ];
}
];
services.prometheus.exporters.blackbox = {
enable = true;
configFile = (pkgs.formats.yaml {}).generate "blackbox.yaml" blackboxConfig;
};
networking.firewall.allowedTCPPorts = [
lokiConfig.server.http_listen_port
];
services.loki = {
enable = true;
configFile = (pkgs.formats.yaml {}).generate "loki.yaml" lokiConfig;
};
}

View File

@@ -0,0 +1,75 @@
{ config, pkgs, ... }:
{
services.nginx.virtualHosts.default = {
locations."= /stub_status".extraConfig = "stub_status;";
};
services.prometheus = {
enable = true;
port = 9001;
exporters = {
nginx.enable = false;
node = {
enable = true;
enabledCollectors = [
"conntrack"
"diskstats"
"entropy"
"filefd"
"filesystem"
"loadavg"
"mdadm"
"meminfo"
"netdev"
"netstat"
"stat"
"time"
"vmstat"
"systemd"
"logind"
"interrupts"
"ksmd"
];
port = 9002;
};
};
};
networking.firewall.allowedTCPPorts = [ config.services.prometheus.exporters.node.port ];
systemd.services.promtail = {
description = "Promtail service for Loki";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.grafana-loki}/bin/promtail --config.file ${(pkgs.formats.yaml {}).generate "promtail.yaml" {
server = {
http_listen_port = 28183;
grpc_listen_port = 0;
};
positions.filename = "/tmp/positions.yaml";
clients = [
{ url = "http://${if config.networking.hostName == "makanek" then "127.0.0.1" else "makanek.r"}:3100/loki/api/v1/push"; }
];
scrape_configs = [
{
job_name = "journal";
journal = {
max_age = "12h";
labels.job = "systemd-journal";
labels.host = config.networking.hostName;
};
relabel_configs = [
{
source_labels = [ "__journal__systemd_unit" ];
target_label = "unit";
}
];
}
];
}}
'';
};
};
}

View File

@@ -1,64 +0,0 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) kieran;
moodle-dl = pkgs.callPackage <niveum/packages/moodle-dl> {};
moodle-dl-config = {
telegram = {
token = lib.strings.fileContents <system-secrets/telegram/moodle-dl.token>;
chat_id = "18980945";
send_error_msg = true;
};
token = lib.strings.fileContents <system-secrets/moodle.token>;
moodle_domain = "moodle.hu-berlin.de";
moodle_path = "/";
download_course_ids = [
99881 # Dialektologie
100183 # Onomastik
100353 # Sanskrit I
100692 # Sanskrit Tutorium
99832 # Germanisch
99823 # Gotisch
99813 # Altalbanisch
98681 # Geistliche Lyrik von Luther bis Lehnert
99667 # Antike Mythologie
];
download_submissions = true;
download_descriptions = false;
download_links_in_descriptions = false;
download_databases = false;
download_forums = false;
download_linked_files = false;
download_also_with_cookie = false;
};
moodle-dl-json = pkgs.writeText "moodle-dl.json" (builtins.toJSON moodle-dl-config);
in
{
users.extraUsers.moodle = {
isNormalUser = false;
home = "/var/lib/moodle";
createHome = true;
openssh.authorizedKeys.keys = [
# for sshfs mount
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtIFmbspaBHaSkLEx43V0uaVd7l9NUFiwt2VOP++KzLjvRMLkyF2hg2HjmogTjUvTyoDs7RHwEH/cHZlJ5JQkM1jRqQpnYwGfkZEwYvmXAl6LY9+vQMP36gNPfXmKX3y3LelO7oD2uhUs0guTtg0tHUyN5/UY5u+VinyD6djxDkHaCUn3S7CS/odBcs/4flXT654wsvzgYicnSKH9R4W+7C0YsckZ/NoIkA4jnuwtWZYWrUkxd4/290buX6pAc5+zVVZqyy0sI4i8s6pO9RL5W7xvYt+w+U0u0dMxm5ckiRmLVKfIbMN4YtDxsZbZDajlQ1nDbOsEsrSXWz4H4cSNot7J820x1qh5SSxL4GSQlcT+6xCFk9kKyflxoS3oLoPLttx3rmOMkZKJWxF/IKLW47orxV6wkG5mHxdeR3cf6jX4j3nkwFVyC9R+WG4w2Z4vKONVE7uWGYU3y4OpR1e6MGHVShkNKqEvC/Kjcc/6v7I7AKRAuPZB0WEw36tA65/8= root@wilde"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFFPHt+FPQ6gq8Ev65YsBZrafdtpWGpCNnlVvy67S1BK root@manakish"
];
useDefaultShell = true;
};
system.activationScripts.moodle-dl-config = "ln -sfn ${toString moodle-dl-json} ${config.users.extraUsers.moodle.home}/config.json";
systemd.services.moodle-dl = {
enable = true;
startAt = "hourly";
serviceConfig = {
Type = "oneshot";
User = config.users.extraUsers.moodle.name;
WorkingDirectory = config.users.extraUsers.moodle.home;
};
wants = [ "network-online.target" ];
script = "${moodle-dl}/bin/moodle-dl";
};
}

View File

@@ -0,0 +1,31 @@
{ config, pkgs, lib, ... }:
let
moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // {
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
});
in
{
containers.moodle-dl-borsfaye = {
autoStart = true;
config = { lib, pkgs, ...}: {
imports = [ <niveum/modules/moodle-dl.nix> ];
services.moodle-dl = {
enable = true;
startAt = "hourly";
package = moodle-dl-package;
notifyOnly = true;
settings = {
telegram = {
token = lib.strings.fileContents <system-secrets/telegram/moodle-dl.token>;
chat_id = "311425510";
send_error_msg = false;
};
token = lib.strings.fileContents <system-secrets/moodle-dl/faye.token>;
moodle_domain = "moodle.hu-berlin.de";
moodle_path = "/";
};
};
};
};
}

View File

@@ -0,0 +1,107 @@
{ config, pkgs, lib, ... }:
let
moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // {
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
});
in
{
imports = [ <niveum/modules/moodle-dl.nix> ];
services.moodle-dl = {
enable = true;
startAt = "hourly";
package = moodle-dl-package;
settings = {
telegram = {
token = lib.strings.fileContents <system-secrets/telegram/moodle-dl.token>;
chat_id = "18980945";
send_error_msg = false;
};
token = lib.strings.fileContents <system-secrets/moodle.token>;
moodle_domain = "moodle.hu-berlin.de";
moodle_path = "/";
download_course_ids = [
# WS 2020
99881 # Dialektologie
100183 # Onomastik
100353 # Sanskrit I
100692 # Sanskrit Tutorium
99832 # Germanisch
99823 # Gotisch
99813 # Altalbanisch
98681 # Geistliche Lyrik von Luther bis Lehnert
99667 # Antike Mythologie
# 52365 # FSR KlassPhil
# SS 2021
104850 # Metrik
103274 # Marc Aurel
102909 # Sanskrit II
104937 # Altirisch
104925 # Gradierung und Komparation
105264 # Was andere Sprachen anders machen
104991 # Warum klingt Orkisch böse
105074 # Litauisch
103685 # Griechische Sprache und Übersetzung I
105455 # Elegia greca
105335 # Homerische Epen
# WS 2021
108122 # Griechisch
107986 # Altostslavisch
107792 # Elegie in Rom
107369 # Tusculanae Disputationes
108586 # Griechische Religion
107988 # Balkanindogermanisch
108312 # Altnordisch
107281 # NLP
108736 # Grammatiktheorie
109438 # Warum klingt Orkisch böse
108025 # Poetik der Nordgermanen
107280 # Statistik
108350 # Attische Redner
107461 # Argonautika
108283 # Digital Classicist
109211 # Altlitauisch
109185 # Etymologie
];
download_submissions = true;
download_descriptions = true;
download_links_in_descriptions = false;
download_databases = false;
download_forums = false;
download_linked_files = false;
download_also_with_cookie = false;
};
};
fileSystems."/export/moodle" = {
device = config.services.moodle-dl.directory;
options = [ "bind" ];
};
networking.firewall.allowedTCPPorts = [ 2049 ];
services.nginx.virtualHosts."moodle.kmein.r" =
let
identity = lib.strings.fileContents <secrets/eduroam/identity>;
password = lib.strings.fileContents <secrets/eduroam/password>;
in {
basicAuth."${identity}" = password;
locations."/" = {
root = config.services.moodle-dl.directory;
extraConfig = ''
autoindex on;
charset UTF-8;
'';
};
};
services.nfs.server = {
enable = true;
exports = let machines = with (import <niveum/lib>).retiolumAddresses; [kabsa manakish]; in ''
/export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines}
/export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines}
'';
};
}

View File

@@ -1,28 +0,0 @@
{ config, pkgs, lib, ... }:
let
playlists = import <niveum/lib/playlists.nix>;
playlistFiles = lib.mapAttrs (name: {tracks, ...}: pkgs.writeText "${name}.m3u" (builtins.concatStringsSep "\n" (map ({url, ...}: url) tracks))) playlists;
linkPlaylist = name: file: ''
ln -sfn "${toString file}" "/var/lib/mpd/playlists/${name}.m3u"
'';
linkPlaylists = lib.concatStringsSep "\n" (lib.mapAttrsToList linkPlaylist playlistFiles);
in
{
system.activationScripts.mpd-playlists = ''
rm -rf /var/lib/mpd/playlists
install -d /var/lib/mpd/playlists
${linkPlaylists}
'';
environment.systemPackages = [ pkgs.ncmpcpp pkgs.mpc_cli ];
services.mpd.enable = true;
services.ympd.enable = true;
# dont let anyone outside localhost or local network in
networking.firewall.extraCommands = let ympdPort = config.services.ympd.webPort; in ''
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 192.168.0.0/16 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 127.0.0.0/8 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -j DROP
'';
}

View File

@@ -1,14 +1,15 @@
{ pkgs, ... }: let
{ pkgs, lib, ... }: let
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
in {
environment.shellAliases.mpv = swallow "mpv";
environment.shellAliases.smpv = swallow "mpv";
home-manager.users.me = {
programs.mpv = {
enable = true;
config = {
force-window = "yes";
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
ytdl-raw-options = lib.concatStringsSep "," [ ''sub-lang="de,en"'' "write-sub=" "write-auto-sub=" ];
screenshot-template = "%F-%wH%wM%wS-%#04n";
};
bindings = {
"Alt+RIGHT" = "add video-rotate 90";
@@ -20,6 +21,9 @@ in {
"Alt+k" = "add video-pan-y 0.05";
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
nixpkgs-unstable.mpvScripts.youtube-quality
];
};
};
}

38
configs/names.nix Normal file
View File

@@ -0,0 +1,38 @@
{ pkgs, lib, ... }:
let
port = 5703;
geogen = (pkgs.fetchFromGitHub {
owner = "kmein";
repo = "scripts";
rev = "8945430f27a8c6fd632dd35382cb094abe3543ff";
sha256 = "1djyxkynypxsrmdf6idgjszqpcgqyq607rrsvl58p2bpymmwibzb";
}) + "/onomastics";
inherit (pkgs.callPackage geogen {}) dependencyEnv;
in
{
systemd.services.names = {
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
description = "Better clone of geogen.stoepel.net";
serviceConfig = {
DynamicUser = true;
};
script = ''
cd $(mktemp -d)
ln -s "${geogen}/wsgi.py" wsgi.py
${dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
'';
};
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
services.nginx.virtualHosts."names.kmein.r" = {
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
};
}

248
configs/neomutt.nix Normal file
View File

@@ -0,0 +1,248 @@
{ pkgs, lib, ... }:
let
mainMailbox = "posteo";
accounts.uni = {
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.uni-old = {
user = "meinhark";
password = lib.strings.fileContents <secrets/eduroam/password>;
address = "meinhark@informatik.hu-berlin.de";
imap = "mailbox.informatik.hu-berlin.de";
smtp = "mailhost.informatik.hu-berlin.de";
smtpSettings = smtp: "smtp://${smtp}";
folders = {
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
};
accounts.work-uni = {
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.work-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."${mainMailbox}" = 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.google-amro = 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.google-kieran = 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 ];
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}";
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 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 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?|anbei|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
macro index * <limit>~F\r
macro index + <limit>all\r
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 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}" "${name}" "${imapRoot}/${account.folders.sent}"
'') accounts)}
''}
set spoolfile="${mainMailbox}"
source ${pkgs.writeText "colors.neomuttrc" ''
# Default index colors:
color index_number blue default
color index red default '.*'
color index_flags lightcyan default '.*'
color index_author yellow default '.*'
color index_subject lightblack default '.*'
# New mail is boldened:
color index_author lightyellow black "~N"
color index_subject lightwhite black "~N"
# Flagged mail is highlighted:
color index_flags lightmagenta default '~F'
# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono error bold
mono indicator reverse
# color sidebar_flagged red black
mono sidebar_new bold
color error red default
color message cyan default
color search brightmagenta default
color hdrdefault lightblack 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 lightblack default
color tree color235 default
# Regex highlighting:
color header red default "^(Date)"
color header yellow default "^(From)"
color header white default "^(B?CC)"
color header brightwhite default "^(Subject)"
color body cyan 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<>\"]"
''}
'';
}

View File

@@ -11,7 +11,6 @@
vim-colors-paramount = pkgs.callPackage <niveum/packages/vimPlugins/vim-colors-paramount.nix> { };
vim-256noir = pkgs.callPackage <niveum/packages/vimPlugins/vim-256noir.nix> { };
icalendar-vim = pkgs.callPackage <niveum/packages/vimPlugins/icalendar-vim.nix> { };
todo-txt-vim = pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> { };
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> { };
vim-fsharp = pkgs.callPackage <niveum/packages/vimPlugins/vim-fsharp.nix> { };
vim-reason-plus = pkgs.callPackage <niveum/packages/vimPlugins/vim-reason-plus.nix> { };
@@ -20,23 +19,19 @@
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(pkgs.neovim.override {
configure = {
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
packages.nvim = with pkgs.vimPlugins; {
start = [
# cheat-sh-vim
# deoplete-nvim
# vim-abolish
ale
fzf-vim
fzfWrapper
goyo
supertab
undotree
tabular
vimwiki
vim-256noir
vim-colors-paramount
vim-commentary
vim-css-color
@@ -44,13 +39,9 @@
vim-fetch
vim-fugitive
vim-gitgutter
vim-pandoc
vim-pandoc-syntax # vim-pandoc-after
vim-repeat
vim-sensible
# vim-startify
vim-surround
vim-mail
];
opt = [
csv
@@ -60,10 +51,10 @@
haskell-vim
icalendar-vim
idris-vim
nim-vim
jq-vim
purescript-vim
rust-vim
todo-txt-vim
typescript-vim
vim-fsharp
vim-javascript
@@ -72,6 +63,9 @@
vim-reason-plus
vim-toml
vimtex
vim-pandoc
vim-pandoc-syntax # vim-pandoc-after
vim-256noir
];
};
};

100
configs/networkmanager.nix Normal file
View File

@@ -0,0 +1,100 @@
{ lib, pkgs, ... }:
let
autowifi = pkgs.writers.writePython3Bin "autowifi" { flakeIgnore = [ "E501" ]; } <stockholm/lass/5pkgs/autowifi/autowifi.py>;
profile = name: custom: lib.recursiveUpdate {
connection.id = name;
connection.type = "wifi";
connection.interface-name = "wlp3s0";
connection.permissions = "";
wifi.mac-address-blacklist = "";
wifi.ssid = name;
wifi.mode = "infrastructure";
ipv4.dns-search = "";
ipv4.method = "auto";
ipv6.addr-gen-mode = "stable-privacy";
ipv6.dns-search = "";
ipv6.method = "auto";
proxy = {};
} custom;
eduroamProfile = {
connection.uuid = "eae9fee6-a7d2-4120-a609-440b457d6fcf";
wifi-security = {
group = "ccmp;tkip;";
key-mgmt = "wpa-eap";
pairwise = "ccmp;";
proto = "rsn;";
};
"802-1x" = {
altsubject-matches = "DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de;";
anonymous-identity = "anonymous@wlan.hu-berlin.de";
ca-cert = pkgs.fetchurl {
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
};
eap = "ttls;";
identity = lib.strings.fileContents <secrets/eduroam/identity>;
password = lib.strings.fileContents <secrets/eduroam/password>;
phase2-auth = "pap";
};
};
in
{
imports = [ ../modules/networkmanager-declarative.nix ];
networking.networkmanager = {
enable = true;
wifi.macAddress = "random";
ethernet.macAddress = "random";
unmanaged = [ "docker*" ];
profiles = lib.mapAttrs profile {
Aether = {
connection.uuid = "7138bb0f-1aeb-4905-890e-a6628427aa21";
ipv6.addr-gen-mode = "stable";
wifi.cloned-mac-address = "stable";
wifi-security = {
psk = lib.strings.fileContents <secrets/wifi/Aether.psk>;
auth-alg = "open";
key-mgmt = "wpa-psk";
};
};
FactoryCommunityGuest = {
connection.uuid = "fb1f2e52-651e-48b5-a72c-1accddf31afb";
connection.timestamp = "1631885129";
wifi.seen-bssids = "54:EC:2F:19:30:DC;54:EC:2F:19:5C:9C;54:EC:2F:58:E4:3C;";
wifi-security = {
psk = "Factory4ever";
auth-alg = "open";
key-mgmt = "wpa-psk";
};
};
o2-WLAN66 = {
connection.uuid = "c563aec3-f344-4ffb-8d1c-60a6cdac8fe0";
wifi-security = {
psk = "PK3468KV488T934U";
auth-alg = "open";
key-mgmt = "wpa-psk";
};
};
"WIFI@DB".connection.uuid = "4eff4e94-8850-4e9f-a338-1787d0d90479";
eduroam = eduroamProfile;
eduroam_5GHz = eduroamProfile;
};
};
users.users.me.extraGroups = [ "networkmanager" ];
systemd.services.autowifi = {
enable = false;
description = "Automatic wifi connector";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.networkmanager ];
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = "10s";
ExecStart = "${autowifi}/bin/autowifi";
};
};
environment.systemPackages = [ pkgs.speedtest-cli ];
}

View File

@@ -2,8 +2,10 @@
let
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
newsboat-home =
"${config.users.users.me.home}/cloud/syncthing/common/newsboat";
"${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
newsboat-config = pkgs.writeText "config" ''
@@ -22,7 +24,7 @@ let
macro , open-in-browser
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler-bin}
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler-bin}
macro y set browser "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata" ; open-in-browser ; set browser ${linkhandler-bin}
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler-bin}
bind-key j down
bind-key k up
@@ -69,5 +71,11 @@ in {
'';
};
environment.systemPackages = [ pkgs.newsboat ];
environment.systemPackages = [
pkgs.newsboat
(pkgs.writers.writeDashBin "mpv-watch-later" ''
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
'')
];
}

View File

@@ -1,11 +1,12 @@
{ pkgs, lib, ... }:
let
passwordFile = path: toString (pkgs.writeText "password" (lib.strings.fileContents path));
inherit (import <niveum/lib>) localAddresses;
in
{
services.nextcloud = {
enable = true;
package = pkgs.nextcloud20;
package = pkgs.nextcloud22;
https = true;
@@ -23,8 +24,8 @@ in
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
dbpassFile = passwordFile <system-secrets/nextcloud/database>;
adminpassFile = passwordFile <system-secrets/nextcloud/admin>;
adminuser = "admin";
# extraTrustedDomains = [ "toum.r" ];
};
@@ -44,7 +45,7 @@ in
services.nginx.virtualHosts."cloud.xn--kiern-0qa.de" = {
enableACME = true;
addSSL = true;
forceSSL = true;
};
# Ensure that postgres is running before running the setup

8
configs/nix.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
# enable `nix flake`
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
};
}

View File

@@ -0,0 +1,19 @@
{ pkgs, lib, ... }:
let
openweathermap-repo = pkgs.fetchFromGitHub {
owner = "ip1981";
repo = "openweathermap";
rev = "9cfef7b14ac5af7109449b54b1cb352b4c76167a";
sha256 = "0sm43wicvw2fy7nq65s8vch6jjb5bszqr4ilnhibayamj4jcpw53";
};
openweathermap = pkgs.haskellPackages.callCabal2nix "openweathermap" openweathermap-repo {};
openweathermap-key = lib.strings.fileContents <secrets/openweathermap.key>;
in {
nixpkgs.config.packageOverrides = pkgs: {
weather = pkgs.writers.writeDashBin "weather" ''
${openweathermap}/bin/openweathermap --api-key ${openweathermap-key} "$@"
'';
};
environment.systemPackages = [ pkgs.weather ];
}

View File

@@ -1,6 +1,39 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, ... }:
let
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
menstruation = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // {
installPhase = ''
${old.installPhase}
# set sensible defaults
sed -i '
/^-z /s/8:00W/1:00E/ # timezone
/^-zl /s/122W19:59 47N36:35/13E22:42 52N27:42/ # default location
/^-zj /s/"Current moment now"/Now/ # default name
/^-zj /s/"Seattle, WA, USA"/Berlin/ # default location
/^_k/s/_k/=k/ # use color
/^_Yd/s/_Yd/=Yd/ # sensible date format
/^_Yt/s/_Yt/=Yt/ # sensible time format
/^_Yv/s/_Yv/=Yv/ # sensible length format
/^:Xbw/s/:Xbw/:Xbn/ # set X11 bitmap format
/^:I /s/80/120/ # wider text output
' $out/astrolog/astrolog.as
'';
});
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "kmein";
repo = "recht";
rev = "0.6.2";
sha256 = "08gnrnz3lwh8h6fyga56yfy9qryzm89xbshm7wpxfyxf2pmp1qfx";
}) {};
in {
imports = [
./krebs.nix
./writing.nix
./python.nix
./haskell
@@ -36,19 +69,17 @@
tdesktop
w3m
wget
httpie
whois
ddgr
ix
nur.repos.kmein.python3Packages.instaloader
dnsutils
# mtr # my traceroute
# FILE MANAGERS
ranger
gnome3.nautilus
pcmanfm
# MEDIA
ffmpeg
imagemagick
exiftool
scrot
# ARCHIVE TOOLS
unzip
@@ -63,20 +94,21 @@
psmisc # for killall, pstree
# SHELL
bat # better cat
du-dust # better du
fd # better find
file # determine file type
dos2unix
trash-cli
ncdu # ncurses disk usage
python3Packages.jsonschema # json validation
jq # json toolkit
jo # json creation
pup # html toolkit
nixpkgs-unstable.htmlq
xsv # csv toolkit
xmlstarlet # xml toolkit
manpages
posix_man_pages
# moreutils # for parallel, sponge, combine
tree
fuse_exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
ripgrep # better grep
rlwrap
@@ -94,21 +126,37 @@
audacity
calibre
inkscape
zoom-us # video conferencing
astrolog # astrolog
anki # flashcards
nixpkgs-unstable.zoom-us # video conferencing
pdfgrep # search in pdf
pdftk # pdf toolkit
evince # for viewing pdf annotations
xournal # for annotating pdfs
poppler_utils # pdf toolkit
foxitreader # for viewing pdf annotations
xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides
hc # print files as qr codes
youtubeDL
bc # calculator
pari # gp -- better calculator
scripts.auc
scripts.infschmv
scripts.qrpaste
scripts.new-mac # get a new mac address
scripts.scanned
scripts.default-gateway
scripts.showkeys-toggle
scripts.kirciuoklis
scripts.favicon
scripts.ipa # XSAMPA to IPA converter
scripts.playlist
scripts.mpv-tv
scripts.devanagari
scripts.betacode # ancient greek betacode to unicode converter
nur.repos.kmein.mahlzeit
# nur.repos.kmein.slide
nur.repos.kmein.vimv
scripts.meteo
scripts.mahlzeit
recht
scripts.vimv
scripts.swallow # window swallowing
scripts.genius
scripts.instaget
@@ -127,8 +175,18 @@
scripts.vg
scripts.fkill
scripts.wttr
scripts.sanskrit-dictionary
scripts.unicodmenu
scripts.horoscope
scripts.closest
scripts.trans
scripts.liddel-scott-jones
scripts.mpv-radio
# kmein.slide
scripts.tolino-screensaver
scripts.rfc
scripts.tag
scripts.menu-calc
nix-prefetch-git
scripts.nix-git
nixfmt
@@ -136,9 +194,34 @@
qrencode
wtf
spotify
spotify-tui
menstruation
(pkgs.writers.writeDashBin "worldradio" ''
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
'')
(pkgs.writers.writeDashBin "chats" ''
${pkgs.openssh}/bin/ssh makanek "cd /var/lib/weechat/logs && grep --ignore-case --color=always --recursive $@" | ${pkgs.less}/bin/less --raw-control-chars
'')
(pkgs.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
nixpkgs-unstable.spotify
ncspot
playerctl
nix-index
scripts.nix-index-update
#krebs
dic
cyberlocker-tools
untilport
kpaste
irc-announce
git-preview
ircaids
];
}

View File

@@ -10,8 +10,9 @@
'';
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
# :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
".stack/config.yaml".text = let inherit (import <niveum/lib>) kieran;
in builtins.toJSON {
".stack/config.yaml".source =
let inherit (import <niveum/lib>) kieran;
in (pkgs.formats.yaml {}).generate "config.yaml" {
templates.params = {
author-name = kieran.name;
author-email = kieran.email;
@@ -32,8 +33,7 @@
cabal2nix
cabal-install
hlint
haskellPackages.brittany
# haskellPackages.hfmt
haskellPackages.ormolu
(haskellPackages.ghcWithHoogle (import ./packages.nix))
] ++ map haskell.lib.justStaticExecutables [
haskellPackages.ghcid

View File

@@ -36,6 +36,7 @@ with haskellPackages; [
directory
dlist
either
edit-distance
exceptions
extra
filepath
@@ -54,6 +55,7 @@ with haskellPackages; [
megaparsec
microlens
monad-logger
monad-memo
mono-traversable
mtl
network
@@ -87,7 +89,6 @@ with haskellPackages; [
time
transformers
turtle
type-unary
unix-time
unordered-containers
vector

View File

@@ -1,24 +0,0 @@
{ lib, pkgs, ... }:
let
krebs-packages = pkgs: {
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> { };
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> { };
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> { };
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> { };
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> { };
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> { };
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> { };
bepasty-client-cli =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/bepasty-client-cli> { };
irc-announce =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> { };
git-preview =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> { };
};
in {
nixpkgs.config.packageOverrides = krebs-packages;
environment.systemPackages =
map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs));
}

View File

@@ -2,18 +2,15 @@
environment.systemPackages = [
(pkgs.python3.withPackages (py: [
py.black
py.python-language-server
py.pyls-mypy
py.pyls-black
py.pyls-isort
# py.python-language-server
# py.pyls-mypy
# py.pyls-black
# py.pyls-isort
py.flake8
py.flask
py.pygments
py.docopt
py.schema
py.ansicolors
py.virtualenv
]))
pkgs.python3Packages.poetry
];
home-manager.users.me.xdg.configFile."pycodestyle".text = ''

View File

@@ -1,8 +1,6 @@
{ pkgs, lib, config, ... }:
let
inherit (import <niveum/lib>) nixpkgs-unstable;
unstable = import nixpkgs-unstable {};
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
zoteroStyle = { name, sha256 }: {
name = "${name}.csl";
@@ -64,16 +62,20 @@ in {
environment.systemPackages = with pkgs; [
texlive.combined.scheme-full
latexrun
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
haskellPackages.pandoc-citeproc
nur.repos.kmein.text2pdf
abiword
gnumeric
# haskellPackages.pandoc-citeproc
scripts.text2pdf
lowdown
glow # markdown to term
libreoffice
# gnumeric
dia
unstable.pandoc
pandoc
pandoc-doc
# proselint
asciidoctor
wordnet
sdcv # stardict cli
# sdcv # stardict cli
];
}

22
configs/power-action.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, config, ... }:
let
suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend";
in
{
krebs.power-action = {
enable = true;
plans.suspend = {
upperLimit = 7;
lowerLimit = 0;
charging = false;
action = pkgs.writeDash "suspend-wrapper" ''
/run/wrappers/bin/sudo ${suspend}
'';
};
user = config.users.users.me.name;
};
security.sudo.extraConfig = ''
${config.krebs.power-action.user} ALL= (root) NOPASSWD: ${suspend}
'';
}

View File

@@ -13,8 +13,6 @@ in {
extraBackends = [ hp-driver ];
};
users.users.me.extraGroups = [ "scanner" ];
hardware.printers.ensurePrinters = [{
name = "OfficeJet";
location = "Zimmer";

212
configs/radio/default.nix Normal file
View File

@@ -0,0 +1,212 @@
{ lib, pkgs, config, ... }:
let
inherit (import <niveum/lib>) tmpfilesConfig serveHtml;
radioStore = "/var/lib/radio";
htgenPort = 8080;
stations = {
lyrikline = {
streamPort = 8001;
mpdPort = 6601;
description = ''
Weltklang. Welt als ewiges Gedicht, das seine Schallspuren durch Raum und Zeit jagt. Endlose Zufallswiedergabe von <a href="//lyrikline.org">lyrikline</a>. Listen to the sound of voices and poems permeating linguistic and geographic barriers, 24 hours per day.
'';
};
lyrik = {
streamPort = 8002;
mpdPort = 6602;
description = ''
Deutsche Lyrik, die du noch nicht gut genug kennst. Tritt in einen Fluss aus Reim und Maß; keine zwei Mal ist er derselbe.
'';
};
};
mpd-add-with-tags = pkgs.writers.writeHaskell "mpd-add-with-tags" {
libraries = with pkgs.haskellPackages; [ optparse-generic libmpd ];
} ''
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
import Control.Monad (void)
import Data.String
import Network.MPD
import Options.Generic
data Options = Options { url :: String, artist :: Maybe String, title :: Maybe String }
deriving (Generic)
instance ParseRecord Options
main :: IO ()
main = do
options <- getRecord "Add to MPD with tags"
void $ withMPD $ do
songId <- addId (fromString $ url options) Nothing
maybe (pure ()) (addTagId songId Artist . fromString) $ artist options
maybe (pure ()) (addTagId songId Title . fromString) $ title options
'';
mpcs = lib.mapAttrs (name: station: pkgs.writers.writeDashBin "mpc-${name}" ''
MPD_PORT=${toString station.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"
'') stations;
in
{
imports = [ <stockholm/krebs/3modules/htgen.nix> ];
nixpkgs.overlays = [
(self: super: { htgen = super.callPackage <stockholm/krebs/5pkgs/simple/htgen> {}; })
];
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";
path = radioStore;
mode = "0755";
user = config.users.extraUsers.radio.name;
age = "1d";
})
];
users.extraUsers.radio = {
isSystemUser = true;
group = "radio";
};
users.groups.radio = {};
krebs.htgen.radio = {
port = htgenPort;
user.name = "radio";
script = ''. ${pkgs.writers.writeDash "meinskript" ''
send200() {
printf 'HTTP/1.1 200 OK\r\n'
printf 'Content-Type: text/html; charset=UTF-8\r\n'
printf 'Connection: close\r\n'
printf '\r\n'
}
case "$Method $Request_URI" in
"GET /lyrik/status")
send200
video_id="$(
${mpcs.lyrik}/bin/mpc-lyrik status -f %file% \
| head -n1 \
| grep -o 'id=[^&]*' \
| sed 's/^id=//g'
)"
${pkgs.youtube-dl}/bin/youtube-dl -j "https://www.youtube.com/watch?v=$video_id" \
| ${pkgs.jq}/bin/jq -r '"% [\(.title)](\(.webpage_url))\n\n\(.description)"' \
| sed 's/$/ /g' \
| ${pkgs.pandoc}/bin/pandoc -s
exit
;;
"GET /lyrikline/status")
send200
hash="$(
${mpcs.lyrikline}/bin/mpc-lyrikline status -f '%file%' \
| head -n 1 \
| md5sum \
| cut -d' ' -f 1
)"
url="$(cat ${radioStore}/$hash)"
echo "<html><body style='margin:0'><iframe style='width:100%;height:100%;border:0' src="$url"></iframe></body></html>"
exit
;;
esac
''}'';
};
containers = lib.mapAttrs (name: station: {
autoStart = true;
config = {config, pkgs, ...}: {
services.mpd = {
enable = true;
network.port = station.mpdPort;
extraConfig = ''
log_level "default"
audio_output {
name "${name}"
type "httpd"
encoder "vorbis"
port "${toString station.streamPort}"
bitrate "128"
format "44100:16:2"
always_on "yes"
tags "yes"
}
'';
};
};
}) stations;
environment.systemPackages = lib.attrValues mpcs;
systemd.services.lyrikline = {
after = [ "container@lyrikline.service" ];
wantedBy = [ "container@lyrikline.service" ];
startAt = "*:00/5";
serviceConfig.User = config.users.extraUsers.radio.name;
preStart = "${mpcs.lyrikline}/bin/mpc-lyrikline crop || :";
script = ''
set -efu
lyrikline=https://www.lyrikline.org
for _ in $(seq 1 10); do
random_route="$(${pkgs.curl}/bin/curl -sSL "$lyrikline/index.php/tools/getrandompoem" --data-raw 'lang=de' --compressed | ${pkgs.jq}/bin/jq -r .link)"
poem_url="$lyrikline$random_route"
poem_file="$(
${pkgs.curl}/bin/curl -sSL "$poem_url" \
| grep -o 'https://.*\.mp3' \
| head -n1
)"
hash="$(echo "$poem_file" | md5sum | cut -d' ' -f 1)"
echo "$poem_file ($hash) -> $poem_url"
echo "$poem_url" > "${radioStore}/$hash"
${mpcs.lyrikline}/bin/mpc-lyrikline add "$poem_file"
done
${mpcs.lyrikline}/bin/mpc-lyrikline play
'';
};
systemd.services.lyrik = {
after = [ "container@lyrik.service" ];
wantedBy = [ "container@lyrik.service" ];
preStart = "${mpcs.lyrik}/bin/mpc-lyrik crop || :";
restartIfChanged = true;
serviceConfig.User = config.users.extraUsers.radio.name;
script =
let
invidious = "https://invidious.silkky.cloud";
videoIds = import <niveum/lib/hot-rotation/lyrik.nix>;
streams = lib.concatMapStringsSep "\n" (id: "${invidious}/latest_version?id=${id}&itag=251") videoIds;
streamsFile = pkgs.writeText "hotrot" streams;
in ''
set -efu
${mpcs.lyrik}/bin/mpc-lyrik add < ${toString streamsFile}
${mpcs.lyrik}/bin/mpc-lyrik crossfade 5
${mpcs.lyrik}/bin/mpc-lyrik random on
${mpcs.lyrik}/bin/mpc-lyrik repeat on
${mpcs.lyrik}/bin/mpc-lyrik play
'';
};
services.nginx.virtualHosts."radio.kmein.de" = {
enableACME = true;
forceSSL = true;
locations = lib.mkMerge (
[
{ "/".extraConfig = serveHtml (import ./station-list.nix { inherit pkgs lib stations; }) pkgs; }
] ++ (lib.mapAttrsToList (name: station: {
"= /${name}/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
"= /${name}/listen.ogg".proxyPass = "http://127.0.0.1:${toString station.streamPort}";
"= /${name}.ogg".return = "301 http://radio.xn--kiern-0qa.de/${name}/listen.ogg"; # legacy
}) stations)
);
};
}

View File

@@ -0,0 +1,43 @@
{ pkgs, lib, stations }:
let
theStations = lib.mapAttrsToList (name: value: value // {name = name;}) stations;
in
pkgs.writeText "index.html" ''
<!doctype html>
<html>
<head>
<title>radio.kierán</title>
<link
rel="stylesheet"
href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.2/css/bulma.min.css"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
</head>
<body>
<main class="section">
<div class="subtitle is-3">Welcome to</div>
<h1 class="title is-1">radio.kierán</h1>
<div class="columns is-multiline">
${lib.concatMapStringsSep "\n" (station: ''
<div class="column">
<div class="box">
<strong class="is-uppercase">${station.name}</strong>
(<a href="/${station.name}/status">status</a>, <a href="/${station.name}/listen.ogg">link</a>)
<p class="has-text-grey">${station.description}</p>
<hr/>
<audio style="width:100%" controls src="/${station.name}/listen.ogg"/>
</div>
</div>'') theStations
}
</div>
</main>
</body>
</html>
''

69
configs/retiolum-map.nix Normal file
View File

@@ -0,0 +1,69 @@
{ config, pkgs, lib, ... }:
let
network = "retiolum";
stateDirectory = "retiolum-map";
geo-ip-database = "${lib.head config.services.geoipupdate.settings.EditionIDs}.mmdb";
geo-ip-database-path = "${config.services.geoipupdate.settings.DatabaseDirectory}/${geo-ip-database}";
tinc-graph-source = pkgs.fetchFromGitHub {
owner = "kmein";
repo = "tinc-graph";
rev = "1b9c69ffdbdab82d30a23e44f739feea63d94163";
sha256 = "0bk4x9l399f80lmz4asx7s5fcsgrfdb6xyymbq884621x4z3d2vp";
};
tinc-graph = pkgs.callPackage tinc-graph-source {};
in
{
systemd.services.retiolum-index = {
description = "Retiolum indexing service";
wants = [ "tinc.${network}.service" ];
script = ''
${tinc-graph}/bin/tinc-graph --geoip-file ${geo-ip-database-path} --network ${network} \
| ${pkgs.coreutils}/bin/tee network.json \
| ${tinc-graph}/bin/tinc-statistics > statistics.json
cp ${tinc-graph}/static/map.html map.html
cp ${tinc-graph}/static/map.html index.html
cp ${tinc-graph}/static/graph.html graph.html
'';
startAt = "hourly";
path = [ pkgs.coreutils pkgs.jq pkgs.tinc_pre ];
serviceConfig = {
Type = "oneshot";
User = "root";
StateDirectory = stateDirectory;
WorkingDirectory = "/var/lib/${stateDirectory}";
};
};
services.geoipupdate = {
enable = true;
settings = {
AccountID = 608777;
LicenseKey = toString <system-secrets/maxmind/license.key>;
EditionIDs = [ "GeoLite2-City" ];
};
};
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."graph.r".locations."/".root = "/var/lib/${stateDirectory}";
};
systemd.services.geoip-share = {
after = [ "geoipupdate.service" ];
script = let
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> {};
in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}";
serviceConfig = {
Type = "oneshot";
DynamicUser = true;
};
};
}

View File

@@ -1,10 +1,7 @@
{ config, pkgs, ... }: {
imports = [ <niveum/modules/retiolum.nix> ];
imports = [
../modules/retiolum.nix
];
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
environment.etc."tinc/retiolum/rsa_key.priv" = {
text = builtins.readFile <system-secrets/retiolum.key>;
mode = "400";
};
}

View File

@@ -4,46 +4,6 @@ let
in{
home-manager.users.me.programs.rofi = {
enable = true;
separator = "solid";
scrollbar = false;
borderWidth = 0;
lines = 5;
font = "Monospace 10";
colors = rec {
window = rec {
background = colours.foreground;
border = background;
separator = colours.black.bright;
};
rows = {
normal = {
background = window.background;
backgroundAlt = window.background;
foreground = colours.background;
highlight = {
foreground = colours.cyan.dark;
inherit (window) background;
};
};
active = {
background = window.background;
backgroundAlt = window.background;
foreground = colours.yellow.dark;
highlight = {
foreground = colours.green.dark;
inherit (window) background;
};
};
urgent = {
background = window.background;
backgroundAlt = window.background;
foreground = colours.red.dark;
highlight = {
foreground = colours.magenta.dark;
inherit (window) background;
};
};
};
};
};
}

20
configs/seafile.nix Normal file
View File

@@ -0,0 +1,20 @@
{ pkgs, config, ... }:
{
services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &";
home-manager.users.me.xdg.configFile = {
"Seafile/Seafile Client.conf".source = (pkgs.formats.ini {}).generate "Seafile Client.conf" {
Behavior = {
hideDockIcon = false;
hideMainWindowWhenStarted = true;
};
Settings = {
computerName = config.networking.hostName;
lastShiburl = "https://box.hu-berlin.de";
};
UsedServerAddresses.main = "https://box.hu-berlin.de";
};
};
environment.systemPackages = [ pkgs.seafile-client ];
}

View File

@@ -1,12 +1,27 @@
{ lib, ... }:
{ config, pkgs, lib, ... }:
{
imports = [ <niveum/modules/spotifyd.nix> ];
disabledModules = [ "services/audio/spotifyd.nix" ];
services.spotifyd = {
enable = true;
config = lib.generators.toINI { } {
settings = {
global = {
username = lib.strings.fileContents <secrets/spotify/username>;
password = lib.strings.fileContents <secrets/spotify/password>;
backend = "pulseaudio";
bitrate = 320;
device_type = "s_t_b"; # set-top box
device_name = config.networking.hostName;
};
};
};
# ref https://github.com/NixOS/nixpkgs/issues/71362#issuecomment-753461502
hardware.pulseaudio.extraConfig = ''
unload-module module-native-protocol-unix
load-module module-native-protocol-unix auth-anonymous=1
'';
systemd.services.spotifyd.serviceConfig.Restart = "always";
}

View File

@@ -35,11 +35,19 @@ in {
user = "root";
port = sshPort;
};
wilde = {
hostname = "wilde.r";
kabsa = {
hostname = "kabsa.r";
user = "kfm";
port = sshPort;
};
"nextcloud.fysi.dev" = {
hostname = "116.203.82.203";
user = "root";
};
"lingua.miaengiadina.ch" = {
hostname = "135.181.85.233";
user = "root";
};
};
};
}

61
configs/tarot.nix Normal file
View File

@@ -0,0 +1,61 @@
{ config, pkgs, lib, ... }:
let
tarotPort = 7407;
tarotFiles = pkgs.fetchzip {
url = "https://c.krebsco.de/tarot.zip";
sha256 = "0jl5vdwlj17pqp94yj02xgsb1gyvs9i08m83kac0jdnhfjl2f75a";
stripRoot = false;
};
tarotKey = builtins.fetchurl {
url = "http://c.krebsco.de/tarot.pdf";
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
};
in
{
krebs.htgen.tarot = {
port = tarotPort;
user.name = "radio";
script = ''. ${pkgs.writers.writeDash "tarot" ''
case "$Method $Request_URI" in
"GET /")
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
card=$(mktemp --tmpdir tarot.XXX)
trap 'rm $card' EXIT
reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1)
if [ "$reverse" -eq 1 ]; then
${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card"
else
${pkgs.coreutils}/bin/cp "$item" "$card"
fi
printf 'HTTP/1.1 200 OK\r\n'
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")"
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card")
printf '\r\n'
cat "$card"
exit
fi
;;
esac
''}'';
};
services.nginx.virtualHosts."tarot.kmein.de" = {
enableACME = true;
forceSSL = true;
locations = {
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}";
"/files/" = {
root = pkgs.linkFarm "tarot" [
{ name = "files/key.pdf"; path = tarotKey; }
{ name = "files/cards"; path = tarotFiles; }
];
extraConfig = ''
autoindex on;
charset UTF-8;
'';
};
};
};
}

View File

@@ -0,0 +1,53 @@
{ pkgs, lib, ... }:
let
nixpkgs-unstable = import <nixpkgs-unstable> {};
toSymbols = pkgs.writers.writeDash "to-symbols" ''
${pkgs.gnused}/bin/sed '
s/\bTri\b//;
s/\bOpp\b//;
s/\bSqu\b//;
s/\bSex\b//;
s/\bCon\b//;
s/Sun//g;
s/Moon//g;
s/Mercury//g;
s/Venus//g;
s/Mars//g;
s/Jupiter//g;
s/Saturn//g;
s/Uranus//g;
s/Neptune//g;
s/Pluto//g;
s/North Node//g;
s/\bLeo\b//g;
s/\bCan\(cer\)\?\b//g;
s/\bGem\(ini\)\?\b//g;
s/\bVir\(go\)\?\b//g;
s/\bLib\(ra\)\?\b//g;
s/\bTau\(rus\)\?\b//g;
s/\bAri\(es\)\?\b//g;
s/\bSco\(rpio\)\?\b//g;
s/\bPis\(ces\)\?\b//g;
s/\bSag\(ittarius\)\?\b//g;
s/\bAqu\(arius\)\?\b//g;
s/\bCap\(ricorn\)\?\b//g;
s/-->//g;
s/\s\+/ /g; # replace multiple spaces by one
s/^.*\([ 0-9]\{2\}:[0-9]\{2\}\) /\1 /; # remove date at beginning of line (but not everything up to v/c X:XX)
s/^\s*//
'
'';
in {
niveum.telegramBots.transits = {
enable = true;
time = "4:00";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = [ "18980945" ];
command = toString (pkgs.writers.writeDash "common-transits" ''
{
${nixpkgs-unstable.astrolog}/bin/astrolog -n -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $(${pkgs.coreutils}/bin/date +'%m %d %Y') -R Uranus Neptune Pluto
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n
'');
};
}

Some files were not shown because too many files have changed in this diff Show More