1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 21:01:07 +01:00

484 Commits

Author SHA1 Message Date
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
82bb2d9f17 feat(chrome): remove youtube recommendations 2020-11-14 13:46:20 +01:00
4fa0256095 feat: install pulsemixer pass-otp 2020-11-14 13:24:25 +01:00
2915594238 feat(urlwatch): move to makanek, watch dlf 2020-11-14 13:23:25 +01:00
cf48d89ea6 chore: update 2020-11-14 13:23:25 +01:00
37f570a979 fix(playlists): remove laut.fm lofi because its quality was killing my speakers 2020-11-12 21:26:58 +01:00
f8af039913 chore(gitea): move into own config 2020-11-11 10:18:04 +01:00
46882af11e feat: run gitea on makanek 2020-11-11 08:51:52 +01:00
2c5d2f4add chore: get stockholm from my mirror 2020-11-11 08:51:22 +01:00
bd089bd408 chore: update keys 2020-11-11 07:31:22 +01:00
fce8d15356 fix(i3, alacritty): make fonts bigger 2020-11-11 07:30:50 +01:00
acec2505e4 feat: add zramfs as swap 2020-11-10 22:17:47 +01:00
218c251d31 feat(retiolum): generate hosts from stockholm, finally add zaatar 2020-11-10 22:17:33 +01:00
8cda7861f9 feat(i3-status-rust): remove newsboat as it was blocking, change separator 2020-11-10 21:03:10 +01:00
a35c883eca feat(wifi): add o2wlan66 2020-11-10 21:01:45 +01:00
db61bc4b91 chore: RIP homeros 2020-11-09 09:40:03 +01:00
43fc9ebba2 feat(manakish): add to retiolum 2020-11-06 10:52:35 +01:00
23d60233a0 fix(zaatar): add new retiolum config 2020-11-06 10:52:35 +01:00
f2fcc3be9a chore: move tuner over from toum to zaatar 2020-11-06 10:38:43 +01:00
30e3baa335 feat(mpd): install ncmpcpp and mpc 2020-11-06 10:38:33 +01:00
616a530c64 fix(playlists): comment out di.fm, add more stations
di.fm returned 404
2020-11-06 10:38:12 +01:00
e5d437949b feat: take dropbox module from dropbox 2020-11-05 21:29:47 +01:00
80c3b143ca feat: write own urlwatch config 2020-11-05 21:29:20 +01:00
263a732580 feat(toum): add tuner website 2020-11-05 21:29:09 +01:00
c638ef93f5 feat: add manakish 2020-11-05 21:28:23 +01:00
69c2f506ae feat(moodle): open for manakish 2020-11-05 20:24:39 +01:00
db4857c86d feat(mpd): group into playlists by style 2020-11-04 08:51:55 +01:00
6668542d53 chore: clean up zigbee2mqtt config 2020-11-04 08:51:19 +01:00
561faed161 feat: add makanek to retiolum 2020-11-03 20:18:57 +01:00
36ed681e99 feat: move some non-packageworthy scripts to packages/scripts/ 2020-11-02 21:49:49 +01:00
be84688b63 feat: install dnsutils 2020-11-02 21:43:54 +01:00
de296c4e62 feat: package much-secripts and dns-sledgehammer 2020-11-02 21:43:38 +01:00
d7807ba1b9 fix(zaatar): make kiosk have german keyboard layout 2020-11-02 21:05:17 +01:00
51fba9baa6 chore(shell.nix): remove histfile setting 2020-11-02 15:44:33 +01:00
a0fb2bd819 feat(moodle): add more courses 2020-11-02 15:43:20 +01:00
a0830070f3 feat(wilde): add swapfile 2020-11-02 15:42:52 +01:00
c860529161 feat(moodle): add more courses 2020-11-02 15:42:41 +01:00
03461dcaaa fix(hu-berlin): fix sshfs mount on homeros 2020-11-01 22:05:59 +01:00
1cd7039759 feat(moodle): add homeros to sshfs share 2020-11-01 21:10:52 +01:00
af0806b766 feat(moodle-dl): add more courses 2020-11-01 21:09:07 +01:00
bd8960fd44 fix(wilde): only build on one core 2020-11-01 15:12:22 +01:00
1bc90b2e84 fix: replace libreoffice by abiword 2020-11-01 15:12:08 +01:00
d2939795ac chore: move hass to configs 2020-11-01 09:45:15 +01:00
4a4d5a148d chore: move matterbridge to configs 2020-11-01 09:44:50 +01:00
f30cfbf142 chore: simplify zigbee2mqtt config 2020-11-01 09:23:27 +01:00
15bda4721d chore: update ssh keys to add termux 2020-11-01 08:27:32 +01:00
4d610461b8 feat(toum): remove kfm user, enable login as weechat 2020-11-01 08:26:30 +01:00
eed54d1593 fix(sshfs): depend on tinc and wpa_supplicant 2020-11-01 08:25:11 +01:00
ddec0551e8 feat(zaatar): allow vt switching from cage 2020-11-01 08:22:20 +01:00
b0f2a74372 chore: update 2020-11-01 08:21:43 +01:00
65584ec52f feat(zaatar): add kiosk to audio group and remove ssh keys 2020-10-31 20:52:53 +01:00
96f5d750ef feat: run moodle-dl on toum, sshfs from wilde 2020-10-31 20:52:10 +01:00
77e97e84a9 feat(makanek): host codimd, nextcloud 2020-10-31 20:51:25 +01:00
96cb298584 feat: make fonts smaller 2020-10-31 20:50:17 +01:00
5dc561da83 chore: move module/constants.nix to lib/default.nix 2020-10-30 11:05:26 +01:00
b8c79fd21c fix(wilde): only build on two cores to still be able to use the computer while building 2020-10-30 08:09:40 +01:00
a98333a6b8 chore: reformat 2020-10-30 08:09:18 +01:00
fa5fe37610 feat(mpd): refine playlist generation 2020-10-30 08:09:00 +01:00
0be0356005 feat(git): dont automatically merge on pull 2020-10-30 08:08:20 +01:00
394615168d feat(mpd): generate streaming links 2020-10-29 08:19:52 +01:00
b6e77f77af feat(mpd): split playlists 2020-10-29 07:54:57 +01:00
d7727433fd feat(zaatar): use ublock for kiosk 2020-10-29 07:54:26 +01:00
3f02559da2 chore: curate radio stations 2020-10-28 22:39:33 +01:00
e7c801b6c4 feat(zaatar): restart kiosk browser if closed 2020-10-28 22:26:04 +01:00
3092fcda85 fix(wilde): dont generate mandb cache 2020-10-28 22:25:45 +01:00
43a1ecedac chore: clean up by removing .todo 2020-10-28 22:25:45 +01:00
da55a342e3 chore: dot -> lib 2020-10-28 22:25:45 +01:00
48fcb08427 chore: scardanelli -> zaatar 2020-10-28 22:25:24 +01:00
a0855f8bbb chore: organize
use read-made spotifyd module
move sshPort to niveum lib (used also from deploy.nix)
factor out sshd config, use from toum
factor out urlwatch
access scardanelli locally
mpd: configure webradio playlist
scardanelli: use cage for kiosk
toum: use wifi config
toum: use spacetime, dont redeclare
toum: use ssh config
2020-10-28 22:25:18 +01:00
3efb4682f2 feat(scardanelli): host media server 2020-10-28 20:29:41 +01:00
048429f593 feat: split spotify config into spotifyd 2020-10-28 20:29:01 +01:00
59cacae72e feat: interdimensional-cable 2020-10-28 20:27:36 +01:00
420245231a feat: factor out wifi config 2020-10-28 20:26:47 +01:00
2911972900 feat: factor out spacetime config 2020-10-28 20:26:47 +01:00
5efcb813f0 chore: remove nixpkgs-unstable 2020-10-28 20:25:26 +01:00
fd8f5d3a5c fix(wilde): only have 2 nix jobs as more will fill up RAM 2020-10-28 11:37:06 +01:00
3508575ebe chore: make 20.09 work 2020-10-28 11:36:46 +01:00
3741304284 feat(toum): run irc bouncer 2020-10-28 11:35:09 +01:00
6bfaf551d2 feat: generate mandb cache to use apropos and whatis 2020-10-28 11:34:36 +01:00
423cb074a0 fix(much): pin nixpkgs so much compiles with email-header 2020-10-27 21:27:12 +01:00
196 changed files with 8877 additions and 2080 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

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
}
}

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"

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 -

4
.gitignore vendored
View File

@@ -1,6 +1,6 @@
secrets.nix
result
.direnv
.envrc
.history
**/*.bak
.todo
node_modules

View File

@@ -1,2 +0,0 @@
x 2020-04-27 2019-08-27 fix offlineimap password
x 2020-04-27 2019-07-09 @package fzf wrappers

View File

View File

@@ -1,6 +0,0 @@
(C) 2019-08-25 environment.etc."sshd/banner-line".text = config.networking.hostName;
(C) 2019-08-25 fix man-pdf: man-pdf 1p env, man-pdf env: man $options -t $command | ps2pdf - $command.pdf
(A) 2019-08-26 run services as their own @users
(A) use lassulus xdg-open wrapper https://cgit.krebsco.de/stockholm/tree/lass/2configs/xdg-open.nix

View File

@@ -1,7 +1,10 @@
{
"url": "https://github.com/rycee/home-manager.git",
"rev": "abaebf3b346c4bef500c5bd2fdebbed109261a0c",
"date": "2020-10-25T19:44:12+01:00",
"sha256": "1gcv2ni4nsicpmi4ain568msvgxch8cj04fxf6qgvhdklmh2y84k",
"fetchSubmodules": false
"url": "https://github.com/nix-community/home-manager.git",
"rev": "7d9ba15214004c979d2c8733f8be12ce6502cf8a",
"date": "2021-09-14T00:53:31+02:00",
"path": "/nix/store/83xlchpzj511c0db0whl99x1ww1apnb5-home-manager",
"sha256": "18kmvzinsi9xgm81dk5kyd03m3y5nn125kmbkxf66xasrg13yqdv",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

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

View File

@@ -0,0 +1,10 @@
{
"url": "https://github.com/mozilla/nixpkgs-mozilla",
"rev": "0510159186dd2ef46e5464484fbdf119393afa58",
"date": "2021-08-17T20:37:26+02:00",
"path": "/nix/store/w877m55xnigwaqrnadmnh2fkvfdxlan5-nixpkgs-mozilla",
"sha256": "1c6r5ldkh71v6acsfhni7f9sxvi7xrqzshcwd8w0hl2rrqyzi58w",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,7 +1,10 @@
{
"url": "https://github.com/NixOS/nixpkgs.git",
"rev": "0ead6f8cfd461c3a366c8bc9893037afd89f798d",
"date": "2020-10-27T18:30:26+01:00",
"sha256": "170kziw7bxfm4mwi8q5c2vdpayml0mini4zyxagbvbivivdj5hla",
"fetchSubmodules": false
"rev": "aee6aefa230479a9c35f5d9031786c83c2db19a2",
"date": "2021-09-14T21:10:26+08:00",
"path": "/nix/store/jmxwzpfb24z159rnpa29drgb8z2znjl9-nixpkgs",
"sha256": "0vy89mw8nd4jrv3byisynl7a3gsx0fsfpgqpaqz2z7vy60l1mkiq",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,7 +1,10 @@
{
"url": "https://github.com/NixOS/nixpkgs.git",
"rev": "95d26c9a9f2a102e25cf318a648de44537f42e09",
"date": "2020-10-24T10:37:53+02:00",
"sha256": "0ymhj252dq7z2ajdjsdz99h106ylm4vsmz5v3xiwsylcs4bz2nl8",
"fetchSubmodules": false
"rev": "b3083bc6933eb7fa4ee7bd4802e9f72b56f3e654",
"date": "2021-09-13T17:06:43+02:00",
"path": "/nix/store/18nwp35nj16hr2li3xbs6vczvw32rp5p-nixpkgs",
"sha256": "1cj8jmzgf2rpf8n8yjsh6qsh66rqpyxh8jhn65ll15578fh98gb9",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

10
.versions/nur.json Normal file
View File

@@ -0,0 +1,10 @@
{
"url": "https://github.com/nix-community/NUR",
"rev": "967dc2db6c7666d5d99113c10b3ff288bf515560",
"date": "2021-09-14T12:44:44+00:00",
"path": "/nix/store/pyxjrg05v2z9zfsqmhg1im7z1sxcya22-NUR",
"sha256": "1lqfny81k2kmsamrf745dm4iw1zk0kdr33hcyf37kvcn99vm870z",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,7 +1,10 @@
{
"url": "https://github.com/krebs/retiolum",
"rev": "21244d55c10234b09a9f121015de1175f5facc69",
"date": "2020-10-25T17:02:11+01:00",
"sha256": "0jzifani14rd68zv728mjq97p04njk8syrqbmn2vjd3plphvl5y5",
"fetchSubmodules": false
"rev": "5384cff550036aa3581f8c6f851392329f28ffe8",
"date": "2021-09-19T09:32:14+02:00",
"path": "/nix/store/izzhb6p76h96zmlz5xdxa1xrpixhbk4s-retiolum",
"sha256": "07318jnkb8zycyi43fydrmrsrbq9ajhb2nnaahj1bxg77pb4wj7a",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,7 +1,10 @@
{
"url": "https://cgit.krebsco.de/stockholm",
"rev": "b034f63f7a2e4361b32c33c0e1a980eecf1a5aa6",
"date": "2020-10-17T01:00:54+02:00",
"sha256": "1ji45h7xp3za5lq9qdg3f8gldrvqfpr8grinblzvf9iqxjgidr68",
"fetchSubmodules": false
"rev": "20e358043546482acfa8c6134f095c1a64ef144d",
"date": "2021-08-31T20:06:03+02:00",
"path": "/nix/store/a03pd46kdsfy9d2q9xlzapnzkj4vf20r-stockholm",
"sha256": "0cwl36zc68qjwcahjgc3vn9qpnyi351m6ngnq21wlncn0k2gqw4a",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -1,45 +1,45 @@
{ pkgs, lib, config, ... }:
let
colourNames =
[ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
colours = lib.getAttrs colourNames config.niveum.colours;
alacrittyConfig = {
background_opacity = 0.9;
colors = {
primary = { inherit (config.niveum.colours) background foreground; };
normal = lib.mapAttrs (_: colour: colour.dark) colours;
bright = lib.mapAttrs (_: colour: colour.bright) colours;
};
font = {
normal.family = "Monospace";
size = config.niveum.fonts.size - 2;
};
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.unstable.alacritty
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 = lib.concatStringsSep " " [ "fetchart" "lastgenre" "lyrics" ];
};
};
}

View File

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

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,10 +2,11 @@
programs.chromium = {
enable = true;
extensions = [
"hdokiejnpimakedhajhdlcegeplioahd" # LastPass
"nngceckbapebfimnlniiiahkandclblb" # BitWarden
# "ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
# "fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"khncfooichmfjbepaaaebmommgaepoid" # Remove YouTube Recommended Videos
];
};

View File

@@ -1,12 +1,10 @@
{ config, lib, pkgs, ... }: {
imports = [
<niveum/modules/seafile.nix>
<niveum/modules/dropbox.nix>
];
niveum = {
dropbox.enable = true;
seafile.enable = true;
dropbox.enable = false;
};
system.activationScripts.home-symlinks = ''
@@ -19,6 +17,16 @@
services.nextcloud-client.enable = true;
};
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";
@@ -28,26 +36,17 @@
declarative = rec {
cert = toString <system-secrets/syncthing/cert.pem>;
key = toString <system-secrets/syncthing/key.pem>;
devices = {
homeros.id =
"HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
scardanelli.id =
"7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
rilke.id =
"NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
wilde.id =
"R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
heym.id =
"HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
};
inherit ((import <niveum/lib>).syncthing) devices;
folders =
let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing";
let cloud-dir = "${config.users.users.me.home}/cloud";
in {
"${syncthing-dir}/common".devices =
[ "homeros" "scardanelli" "wilde" ];
"${syncthing-dir}/library".devices = lib.attrNames devices;
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices;
"${syncthing-dir}/music".devices = lib.attrNames devices;
"${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,40 +1,14 @@
{ pkgs, lib, config, options, ... }:
let
inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses;
inherit (import <niveum/lib>) localAddresses kieran;
in {
imports = [
<niveum/modules/constants.nix>
<home-manager/nixos>
<niveum/modules/system-dependent.nix>
{
boot.supportedFilesystems = [ "ntfs" ];
}
{
niveum.user = {
github = "kmein";
email = "kmein@posteo.de";
name = "Kierán Meinhardt";
};
niveum.applications = rec {
fileManager = "$TERMINAL -e ${pkgs.ranger}/bin/ranger";
};
niveum.theme = {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome3.gnome-themes-extra;
};
icon = {
name = "Adwaita";
package = pkgs.gnome3.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
};
};
}
{
nix.nixPath = [
"/var/src"
@@ -42,32 +16,15 @@ in {
];
}
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
{
environment.systemPackages = [
(pkgs.writers.writeDashBin "x-www-browser" ''
for browser in $BROWSER firefox chromium google-chrome google-chrome-stable opera vivaldi qupzilla iceweasel konqueror firefox-aurora google-chrome-beta opera-beta vivaldi-beta google-chrome-dev opera-developer vivaldi-snapshot luakit midori epiphany lynx w3m dillo elinks vimb; do
if command -v $browser > /dev/null 2>&1; then
exec $browser "$@"
fi
done
exit 1
'')
];
}
{
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/aea85375c7a82297d977904de8dd7f41baf2d59a.tar.gz") {
inherit pkgs;
};
nur = import <nur> { inherit pkgs; };
writeDashBin = pkgs.writers.writeDashBin;
writeDash = pkgs.writers.writeDash;
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {
scardanelli = config.networking.hostName == "scardanelli";
};
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
};
@@ -76,7 +33,6 @@ in {
(self: super: {
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
})
(import <niveum/overlays/toml.nix>)
(import <stockholm/krebs/5pkgs/haskell>)
(import <stockholm/submodules/nix-writers/pkgs>)
(import <stockholm/krebs/5pkgs/override>)
@@ -86,14 +42,6 @@ in {
{
boot.cleanTmpDir = true;
boot.loader.timeout = 1;
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
}
{
time.timeZone = "Europe/Berlin";
location = {
latitude = 52.517;
longitude = 13.3872;
};
}
{
home-manager.users.me = {
@@ -113,23 +61,38 @@ in {
users.users.me = {
name = "kfm";
description = config.niveum.user.name;
description = kieran.name;
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
isNormalUser = true;
uid = 1000;
};
home-manager.users.me.xdg.enable = true;
}
{
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 ];
environment.systemPackages = [ pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer ];
}
{
environment.interactiveShellInit =
@@ -150,29 +113,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 kmein@prism.r -t tmux attach";
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
@@ -180,50 +141,6 @@ in {
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
};
}
{
networking.wireless = {
enable = true;
userControlled.enable = true;
networks = {
"Aether" = {
pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
priority = 10;
};
"Asoziales Netzwerk" = {
pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
priority = 10;
};
"Libertarian WiFi" = {
pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
priority = 9;
};
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
"FlixBus Wi-Fi" = { };
"FlixBus" = { };
"FlixTrain" = { };
"BVG Wi-Fi" = { };
"wannseeforum" = { }; # login via curl -XPOST http://WannseeLancom.intern.:80/authen/login/ -d userid=$USER_ID -d password=$PASSWORD
"Hotel_Krone" = { }; # login: http://192.168.10.1/
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
"WIFIonICE" = { }; # login: http://10.101.64.10/
"WLAN-914742".psk = "67647139648174545446";
"KDG-CEAA4".psk = "PBkBSmejcvM4";
"KDG-4ECF7".psk = "Gdbwh7afw2Bx";
"WLAN-XVMU6T".pskRaw =
"46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
"c-base-public" = { };
"discord".psk = "baraustrinken";
"GoOnline".psk = "airbnbguest";
"security-by-obscurity".psk = "44629828256481964386";
"Mayflower".psk = "Fr31EsLan";
"Born11".psk = "56LMVLbw840EGNWk0RYRqvgicx3FSO";
"FactoryCommunityGuest".psk = "Factory4ever";
"krebs".psk = "aidsballs";
};
};
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
}
{ i18n.defaultLocale = "en_GB.UTF-8"; }
{ services.illum.enable = true; }
{
@@ -254,13 +171,16 @@ in {
{
programs.gnupg.agent.enable = true;
environment.systemPackages = [ pkgs.gnupg pkgs.pass ];
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 "";
};
@@ -273,10 +193,12 @@ in {
}
./alacritty.nix
./bash.nix
./beets.nix
./bluetooth.nix
./ccc.nix
./kleiter.nix
./calcurse.nix
# ./kleiter.nix
./khal.nix
./engiadina.nix
./chromium.nix
./cloud.nix
./compton.nix
@@ -295,35 +217,36 @@ in {
./i3.nix
./keybase.nix
./keyboard.nix
./mail.nix
./mail/client.nix
./mpv.nix
./mime.nix
./nano.nix
./neovim.nix
./nix.nix
./newsboat.nix
./flameshot-once.nix
./nixpkgs-unstable.nix
./packages
./power-action.nix
./printing.nix
./openweathermap.nix
./wallpaper.nix
./redshift.nix
./retiolum.nix
./rofi.nix
./spotify.nix
./spacetime.nix
./seafile.nix
./ssh.nix
./sshd.nix
./sudo.nix
./sxiv.nix
./themes/mac-os.nix
./theming.nix
./tmux.nix
./tor.nix
./todo-txt.nix
# ./tor.nix
./traadfri.nix
./unclutter.nix
./version.nix
./vscode.nix
./watson.nix
./xautolock.nix
./zsh.nix
];
}

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

@@ -1,12 +1,14 @@
{ config, pkgs, ... }:
with config.niveum; {
let
inherit (import <niveum/lib>) defaultApplications colours theme;
in {
home-manager.users.me.services.dunst = {
enable = true;
iconTheme = theme.icon;
iconTheme = (theme pkgs).icon;
settings = {
global = {
transparency = 10;
font = "Sans ${toString fonts.size}";
font = "Monospace 8";
geometry = "200x5-30+20";
frame_color = colours.foreground;
follow = "mouse";
@@ -31,7 +33,7 @@ with config.niveum; {
sticky_history = true;
history_length = 20;
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
browser = "x-www-browser";
browser = (defaultApplications pkgs).browser;
verbosity = "mesg";
corner_radius = 0;
mouse_left_click = "do_action";

30
configs/engiadina.nix Normal file
View File

@@ -0,0 +1,30 @@
{ config, pkgs, ... }:
let
inherit (import <niveum/lib>) tmpfilesConfig;
cdnRoot = "/var/lib/engiadina";
in
{
imports = [ <stockholm/krebs/3modules/permown.nix> ];
krebs.permown.${cdnRoot} = {
owner = config.users.users.me.name;
group = "users";
umask = "0002";
};
services.nginx = {
enable = true;
virtualHosts.default = {
root = cdnRoot;
listen = [{
addr = "0.0.0.0";
port = 3333;
}];
};
};
environment.shellAliases = {
engiadina-watch = "${pkgs.findutils}/bin/find extra-src src | ${pkgs.entr}/bin/entr -s 'build-component && ${pkgs.rsync}/bin/rsync -avu dist/*.js ${cdnRoot}/'";
engiadina-edit = "$EDITOR ${cdnRoot}/index.html";
};
}

View File

@@ -1,24 +1,26 @@
{ lib, pkgs, ... }:
let
flameshot-once =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
in {
nixpkgs.overlays = [
(self: super: {
xwaitforwindow =
super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> { };
})
];
{ config, lib, pkgs, ... }:
{
home-manager.users.me = {
services.flameshot.enable = true;
environment.systemPackages = [
(flameshot-once.override {
config.imgur = {
enable = true;
createUrl = "http://p.r/image";
deleteUrl = "http://p.r/image/delete/%1";
xdg-open.browser = "x-www-browser";
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini {}).generate "flameshot.ini" {
General = {
disabledTrayIcon = true;
checkForUpdates = false;
contrastOpacity = 188;
savePath = "/tmp";
savePathFixed = true;
drawThickness = 0;
showStartupLaunchMessage = false;
filenamePattern = "shot_%F_%T";
};
config.timeout = 200;
})
];
};
systemd.user.services.flameshot.Unit.Requires = lib.mkForce [];
systemd.user.services.flameshot.Environment = {
# IMGUR_CREATE_URL = "https://p.krebsco.de/image";
# IMGUR_DELETE_URL = "https://p.krebsco.de/image/delete/%1";
PATH = "${config.home-manager.users.me.home.profileDirectory}/bin";
};
};
}

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 = {
@@ -48,6 +55,16 @@ in {
};
environment.systemPackages = [
(pkgs.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.writeDashBin "flixmenu" ''
set -efu
cd "${flixLocation}/download"

View File

@@ -1,9 +1,9 @@
{ pkgs, ... }: {
niveum.fonts.size = 9;
nixpkgs.config.joypixels.acceptLicense = true;
fonts = {
enableDefaultFonts = true;
enableFontDir = true;
fontDir.enable = true;
fonts = with pkgs; [
corefonts
eb-garamond
@@ -15,6 +15,8 @@
libertine
lmodern
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
roboto-mono
roboto-slab
@@ -28,9 +30,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

@@ -1,4 +1,8 @@
{ pkgs, config, lib, ... }: {
{ pkgs, config, lib, ... }:
let
inherit (import <niveum/lib>) kieran ignorePaths;
in
{
environment.systemPackages = [
pkgs.mr
pkgs.git
@@ -6,7 +10,7 @@
pkgs.gitAndTools.hub
pkgs.gitAndTools.gh
pkgs.gitAndTools.git-extras
pkgs.unstable.gitAndTools.git-trim
pkgs.gitAndTools.git-trim
pkgs.gitstats
pkgs.patch
pkgs.patchutils
@@ -53,8 +57,8 @@
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = config.niveum.user.name;
userEmail = config.niveum.user.email;
userName = kieran.name;
userEmail = kieran.email;
aliases = {
br = "branch";
co = "checkout";
@@ -69,8 +73,11 @@
graph =
"log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
};
ignores = config.niveum.ignore;
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 = {

13
configs/gitea.nix Normal file
View File

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

View File

@@ -4,14 +4,9 @@ let
inherit (import <niveum/lib>) localAddresses;
in
{
disabledModules = [
"services/misc/home-assistant.nix"
];
imports = [
./zigbee.nix
./frontend.nix
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
];
services.home-assistant = {
@@ -22,8 +17,8 @@ in
config = {
homeassistant = {
name = "Toum";
latitude = 52.461;
longitude = 13.378;
latitude = config.location.latitude;
longitude = config.location.longitude;
elevation = 90; # TODO find out how high I live
unit_system = "metric";
time_zone = config.time.timeZone;

View File

@@ -2,15 +2,6 @@ let
inherit (import ./lib.nix) triggers;
in
{
disabledModules = [
"services/misc/home-assistant.nix"
];
imports = [
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
];
services.home-assistant.config = {
frontend = {
themes = {

View File

@@ -1,63 +1,25 @@
{ config, pkgs, lib, ... }:
let
inherit (import <stockholm/lib>) genid;
inherit (import <niveum/lib>) localAddresses;
zigbee2mqttDevice = "/dev/ttyACM0";
zigbee2mqttConfig = {
permit_join = false;
homeassistant = true;
serial = {
port = zigbee2mqttDevice;
disable_led = true;
};
mqtt = {
discovery = true;
base_topic = "zigbee";
server = "mqtt://${localAddresses.toum}"; # Rasperry local IP
user = "albrecht";
password = lib.strings.fileContents <system-secrets/mosquitto>;
};
};
zigbee2mqtt_cfg = pkgs.writeText "zigbee2mqtt.json" (builtins.toJSON zigbee2mqttConfig);
in
{
disabledModules = [
"services/misc/home-assistant.nix"
];
imports = [
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
<nixpkgs-unstable/nixos/modules/services/misc/zigbee2mqtt.nix>
];
/*
ids = {
uids.zigbee2mqtt = genid "zigbee2mqtt";
gids.zigbee2mqtt = genid "zigbee2mqtt";
};
services.zigbee2mqtt = {
enable = true;
config = zigbee2mqttConfig;
package = pkgs.unstable.zigbee2mqtt;
};
*/
system.activationScripts.installZigbee = ''
install -d /var/lib/zigbee2mqtt
install ${zigbee2mqtt_cfg} /var/lib/zigbee2mqtt/configuration.yaml
'';
# hack to restart docker container on config change
systemd.services.docker-zigbee2mqtt.environment.cfg = zigbee2mqtt_cfg;
docker-containers.zigbee2mqtt = {
image = "koenkk/zigbee2mqtt";
extraDockerOptions = [
"--device=${zigbee2mqttDevice}:${zigbee2mqttDevice}"
];
volumes = ["/var/lib/zigbee2mqtt:/app/data"];
config = {
permit_join = false;
homeassistant = true;
serial = {
port = "/dev/ttyACM0";
disable_led = true;
};
mqtt = {
discovery = true;
base_topic = "zigbee";
server = "mqtt://${localAddresses.toum}";
user = "albrecht";
password = lib.strings.fileContents <system-secrets/mosquitto>;
};
};
};
services.mosquitto = {

65
configs/hedgedoc.nix Normal file
View File

@@ -0,0 +1,65 @@
{ pkgs, ... }:
let
backupLocation = "/var/lib/codimd-backup";
stateLocation = "/var/lib/codimd/state.sqlite";
nixpkgs-unstable = import <nixpkgs-unstable> {};
in
{
imports = [ <stockholm/krebs/3modules/permown.nix> ];
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.hedgedoc = {
enable = true;
configuration = {
allowAnonymous = true;
allowGravatar = false;
allowFreeURL = true;
db = {
dialect = "sqlite";
storage = stateLocation;
};
port = 3091;
};
};
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

@@ -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

@@ -1,43 +1,69 @@
{ pkgs, lib, ... }:
{ config, pkgs, lib, ... }:
let
inherit (lib.strings) fileContents;
inherit (import <niveum/lib>) sshPort;
eduroam = {
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."/media/hu-berlin/germhome" = {
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
fsType = "cifs";
options = hu-berlin-cifs-options;
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "hu-vpn" ''
${pkgs.openfortivpn}/bin/openfortivpn -p "${eduroam.password}" -c ${pkgs.writeText "hu-berlin.config" ''
(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";
}))
)
];
systemd.services.hu-vpn = {
enable = false;
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

@@ -1,5 +1,6 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) defaultApplications colours;
klem = import <niveum/packages/scripts/klem.nix> {
inherit pkgs lib;
config.scripts = {
@@ -26,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)"
'';
};
};
@@ -36,30 +43,7 @@ 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 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
};
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 with config.niveum; {
in {
services.xserver = {
displayManager.defaultSession = "none+i3";
windowManager.i3 = {
@@ -68,10 +52,25 @@ in with config.niveum; {
};
};
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 ${toString config.niveum.fonts.size}" ];
fonts = {names = ["Sans"]; size = 10.0;};
modifier = "Mod4";
window = {
titlebar = false;
@@ -110,9 +109,9 @@ in with config.niveum; {
};
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;
@@ -133,7 +132,7 @@ in with config.niveum; {
};
bars = [{
workspaceButtons = false;
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
fonts = {names = ["Sans"]; size = 8.0;};
mode = "hide"; # "dock"
position = "bottom";
colors = rec {
@@ -147,10 +146,9 @@ in with config.niveum; {
};
};
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
pkgs.writeTOML (import <niveum/dot/i3status-rust.nix> {
wifi-interface = networkInterfaces.wireless;
batteryBlock = batteryBlocks.default;
inherit (config.niveum) colours;
(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 with config.niveum; {
"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,22 +182,26 @@ in with config.niveum; {
"${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";
"${modifier}+Return" = "exec i3-sensible-terminal";
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
"${modifier}+t" = "exec ${applications.fileManager}";
"${modifier}+y" = "exec x-www-browser";
"${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";
@@ -221,31 +221,26 @@ in with config.niveum; {
''
}";
"${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";
"Print" = "exec flameshot gui -p /tmp";
"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";

123
configs/khal.nix Normal file
View File

@@ -0,0 +1,123 @@
{ config, pkgs, lib, ... }:
let
davHome = "~/.local/share/dav";
davEndpoint = "https://cloud.xn--kiern-0qa.de/remote.php/dav";
username = "kieran";
password = lib.fileContents <secrets/nextcloud/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
'';
};
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/todoman.conf".text = ''
[main]
path = ${davHome}/calendar/*
date_format = %Y-%m-%d
time_format = %H:%M
default_due = 0
default_list = Personal
startable = True
'';
"khal/config".text = ''
[calendars]
[[kalender_local]]
path = ${davHome}/calendar/*
type = discover
[default]
highlight_event_days = True
timedelta = 5d
[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 = ["from a", "from b"]
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 = "${davEndpoint}/addressbooks/users/${username}/"
username = "${username}"
password = "${password}"
[storage kalender_cloud]
type = "caldav"
url = "${davEndpoint}/calendars/${username}/"
username = "${username}"
password = "${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;
};
}

View File

@@ -1,233 +0,0 @@
{ config, pkgs, lib, ... }:
let
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;
};
much-pkg = pkgs.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
much = pkgs.haskell.lib.dontHaddock much-pkg;
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"
"homeros"
]);
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 = config.niveum.user.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 = config.niveum.user.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 = config.niveum.user.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 = config.niveum.user.name;
userName = "kieran.meinhardt@posteo.net";
passwordCommand = pass_ <secrets/mail/posteo>;
};
hu-berlin = enableDefaults {
primary = false;
address = "meinhark@hu-berlin.de";
realName = config.niveum.user.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;
};
};
};
};
}

145
configs/mail/accounts.nix Normal file
View File

@@ -0,0 +1,145 @@
{ lib, ... }:
let
inherit (import <niveum/lib>) kieran;
enableDefaults = lib.recursiveUpdate {
mbsync = {
enable = true;
create = "both";
expunge = "both";
};
msmtp.enable = true;
notmuch.enable = true;
};
settings = {
fastmail = {
smtp = {
host = "smtp.fastmail.com";
port = 465;
tls.enable = true;
};
imap = {
host = "imap.fastmail.com";
port = 993;
tls.enable = true;
};
};
cock = {
smtp = {
host = "mail.cock.li";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
imap = {
host = "mail.cock.li";
port = 993;
tls.enable = true;
};
};
posteo = {
smtp = {
host = "posteo.de";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
imap = {
host = "posteo.de";
port = 993;
tls.enable = true;
};
};
hu-berlin = {
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;
};
};
};
# 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))}";
in
{
fysi = enableDefaults {
primary = false;
userName = "kieran@fysi.tech";
address = "kieran@fysi.tech";
realName = kieran.name;
passwordCommand = pass_ <secrets/mail/fastmail>;
inherit (settings.fastmail) imap smtp;
};
cock = enableDefaults {
primary = false;
userName = "2210@cock.li";
address = "2210@cock.li";
realName = "2210";
passwordCommand = pass_ <secrets/mail/cock>;
inherit (settings.cock) imap smtp;
};
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;
address = "kieran.meinhardt@posteo.net";
realName = kieran.name;
userName = "kieran.meinhardt@posteo.net";
passwordCommand = pass_ <secrets/mail/posteo>;
inherit (settings.posteo) imap smtp;
};
hu-berlin = enableDefaults {
primary = false;
address = "meinhark@hu-berlin.de";
realName = kieran.name;
userName = "meinhark";
passwordCommand = pass_ <secrets/eduroam/password>;
inherit (settings.hu-berlin) imap smtp;
};
hu-berlin-work = enableDefaults {
primary = false;
address = "meinhaki@hu-berlin.de";
realName = kieran.name;
userName = "meinhaki";
passwordCommand = pass_ <secrets/mail/meinhaki>;
inherit (settings.hu-berlin) imap smtp;
};
}

52
configs/mail/client.nix Normal file
View File

@@ -0,0 +1,52 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) email-sshKey;
much =
let
nixpkgs-much = import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "7c2a362b58a1c2ba72d24aa3869da3b1a91d39e1";
sha256 = "0gl4xndyahasa9dv5mi3x9w8s457wl2xh9lcldizcn1irjvkrzs4";
}) {
overlays = [
(import <stockholm/krebs/5pkgs/haskell>)
];
};
much-pkg = pkgs.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
in nixpkgs-much.haskell.lib.dontHaddock much-pkg;
in {
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
users.users.me.openssh.authorizedKeys.keys = [ email-sshKey ];
environment.systemPackages = [
pkgs.notmuch-addrlookup
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 = {
programs.notmuch = {
enable = true;
search.excludeTags = [ "deleted" "spam" ];
};
programs.msmtp.enable = true;
accounts.email.accounts = import ./accounts.nix { inherit lib; };
};
}

80
configs/mail/fetcher.nix Normal file
View File

@@ -0,0 +1,80 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) kieran sshPort;
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" ];
}
];
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);
in
{
imports = [ <stockholm/krebs/3modules/secret.nix> ];
krebs.secret.files.email-ssh = {
path = "${config.users.users.email.home}/.ssh/id_ed25519";
owner.name = config.users.users.email.name;
source-path = toString <system-secrets> + "/email/ssh.key";
};
users.users.email = {
isNormalUser = true;
description = "fetching mails since 2021";
};
systemd.services.mail-sync =
let
hosts = [ "manakish.r" "kabsa.r" ];
in {
enable = true;
wants = [ "network-online.target" config.krebs.secret.files.email-ssh.service ];
startAt = "*:0/3";
serviceConfig.User = config.users.users.email.name;
serviceConfig.Type = "oneshot";
environment.NOTMUCH_CONFIG = config.home-manager.users.email.home.sessionVariables.NOTMUCH_CONFIG;
path = [ pkgs.notmuch pkgs.openssh ];
script = ''
${pkgs.isync}/bin/mbsync --all || true
${lib.concatMapStringsSep "\n" (host: ''
echo === syncing ${host}
${pkgs.muchsync}/bin/muchsync -s 'ssh -CTaxq -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=4 -p ${toString sshPort}' kfm@${host} || :
'') hosts}
'';
};
home-manager.users.email = {
programs.mbsync.enable = true;
accounts.email.accounts = import ./accounts.nix { inherit lib; };
programs.notmuch = {
enable = true;
new.tags = [ "new" ];
hooks.postNew = generateTaggingScript tagRules;
};
};
}

56
configs/matterbridge.nix Normal file
View File

@@ -0,0 +1,56 @@
{ pkgs, lib, ... }:
{
nixpkgs.overlays = [
(self: super: {
matterbridge = (import (super.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "e45d91ee65db293a172ec506759d1248e40c35f5";
sha256 = "03cjs5xcx09lw0djyrx2kfakw7gkg4iqmy9w25azai62im39l30k";
}) {}).matterbridge;
})
];
services.matterbridge = {
enable = true;
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"; StripMarkdown = true;
in {
hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick StripMarkdown; };
};
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"
}
];
}
];
});
};
}

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,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";
};
}

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

@@ -0,0 +1,172 @@
{ lib, config, pkgs, ... }:
let
lokiConfig = import ./loki.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 = "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.alias}}: Reboot";
}
];
}];
})];
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 <a href="http://${config.services.grafana.domain}/d/alpUteInz/niveum">Grafana</a>.
{{ else -}}
😌 <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}"
# "127.0.0.1:${toString config.services.prometheus.exporters.nginx.port}"
]; } ];
}
{
job_name = "zaatar";
static_configs = [ { targets = [ "zaatar.r:${toString config.services.prometheus.exporters.node.port}" ]; } ];
}
];
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

@@ -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,73 @@
{ 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
];
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.nfs.server = {
enable = true;
exports = ''
/export 10.243.2.4(fsid=0) 10.243.2.85(fsid=0)
/export/moodle 10.243.2.4(insecure,rw) 10.243.2.85(insecure,rw)
'';
};
}

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";
osc = "no";
ytdl-raw-options = lib.concatStringsSep "," [ ''sub-lang="de,en"'' "write-sub=" "write-auto-sub=" ];
};
bindings = {
"Alt+RIGHT" = "add video-rotate 90";
@@ -20,6 +21,10 @@ in {
"Alt+k" = "add video-pan-y 0.05";
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
pkgs.mpvScripts.thumbnail
nixpkgs-unstable.mpvScripts.youtube-quality
];
};
};
}

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,9 +19,10 @@
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(pkgs.neovim.override {
configure = {
customRC = builtins.readFile <niveum/dot/init.vim>;
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
packages.nvim = with pkgs.vimPlugins; {
start = [
# cheat-sh-vim
@@ -60,10 +60,10 @@
haskell-vim
icalendar-vim
idris-vim
nim-vim
jq-vim
purescript-vim
rust-vim
todo-txt-vim
typescript-vim
vim-fsharp
vim-javascript

102
configs/networkmanager.nix Normal file
View File

@@ -0,0 +1,102 @@
{ 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 = [ <niveum/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";
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";
};
};
networking.networkmanager.dispatcherScripts = [
{ source = "${pkgs.nur.repos.makefu.prison-break}/bin/prison-break"; }
];
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

@@ -3,35 +3,22 @@ let
inherit (import <niveum/lib>) localAddresses;
in
{
networking.firewall.allowedTCPPorts = [ 80 ];
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
# Only allow PFS-enabled ciphers with AES256
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
};
services.nextcloud = {
enable = true;
package = pkgs.nextcloud19;
package = pkgs.nextcloud21;
https = true;
autoUpdateApps = {
enable = true;
startAt = "05:00:00";
};
hostName = localAddresses.toum;
hostName = "cloud.xn--kiern-0qa.de";
nginx.enable = true;
# https = true;
config = {
# overwriteProtocol = "https";
overwriteProtocol = "https";
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
@@ -39,7 +26,7 @@ in
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
adminuser = "admin";
extraTrustedDomains = [ "toum.r" ];
# extraTrustedDomains = [ "toum.r" ];
};
};
@@ -54,6 +41,12 @@ in
];
};
services.nginx.virtualHosts."cloud.xn--kiern-0qa.de" = {
enableACME = true;
forceSSL = true;
};
# Ensure that postgres is running before running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];

10
configs/nix.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
# enable `nix flake`
nix = {
package = pkgs.nix;
# extraOptions = ''
# experimental-features = nix-command
# '';
};
}

View File

@@ -1,5 +0,0 @@
{ config, ... }: {
nixpkgs.config.packageOverrides = pkgs: {
unstable = import <nixpkgs-unstable> { config = config.nixpkgs.config; };
};
}

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,4 +1,17 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, ... }:
let
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "kmein";
repo = "recht";
rev = "0.6.2";
sha256 = "08gnrnz3lwh8h6fyga56yfy9qryzm89xbshm7wpxfyxf2pmp1qfx";
}) {};
in {
imports = [
./krebs.nix
./writing.nix
@@ -33,25 +46,21 @@
# INTERNET
aria2
firefox
# tor-browser-bundle-bin
# qutebrowser
tdesktop
skypeforlinux
w3m
wget
httpie
whois
ddgr
ix
# thunderbird
nur.repos.kmein.python3Packages.instaloader
dnsutils
# mtr # my traceroute
# FILE MANAGERS
ranger
gnome3.nautilus
pcmanfm
# MEDIA
ffmpeg
imagemagick
exiftool
scrot
# ARCHIVE TOOLS
unzip
@@ -66,20 +75,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
@@ -97,19 +107,31 @@
audacity
calibre
inkscape
zoom-us # video conferencing
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.infschmv
scripts.new-mac # get a new mac address
scripts.scanned
scripts.default-gateway
scripts.showkeys-toggle
scripts.favicon
scripts.ipa # XSAMPA to IPA converter
scripts.playlist
scripts.mpv-tv
scripts.devanagari
scripts.betacode # ancient greek betacode to unicode converter
scripts.meteo
nur.repos.kmein.mahlzeit
recht
# nur.repos.kmein.slide
nur.repos.kmein.vimv
scripts.swallow # window swallowing
@@ -121,20 +143,49 @@
scripts.notetags
scripts.booksplit
scripts.dmenurandr
scripts.interdimensional-cable
scripts.dmenubluetooth
scripts.manual-sort
scripts.much-scripts
scripts.dns-sledgehammer
ts
scripts.vg
scripts.fkill
scripts.wttr
scripts.boetlingk
scripts.unicodmenu
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
par
qrencode
wtf
(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
nixpkgs-unstable.spotify-tui
playerctl
nix-index
scripts.nix-index-update
];
}

View File

@@ -10,13 +10,14 @@
'';
# :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 (config.niveum) user;
in builtins.toJSON {
".stack/config.yaml".source =
let inherit (import <niveum/lib>) kieran;
in (pkgs.formats.yaml {}).generate "config.yaml" {
templates.params = {
author-name = user.name;
author-email = user.email;
copyright = "Copyright: (c) 2019 ${user.name}";
github-username = user.github;
author-name = kieran.name;
author-email = kieran.email;
copyright = "Copyright: (c) 2020 ${kieran.name}";
github-username = kieran.github;
};
};
};
@@ -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

@@ -87,7 +87,6 @@ with haskellPackages; [
time
transformers
turtle
type-unary
unix-time
unordered-containers
vector

View File

@@ -6,11 +6,9 @@ let
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> { };
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> { };
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> { };
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> { };
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 =

View File

@@ -7,13 +7,10 @@
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

@@ -15,17 +15,11 @@ let
})
(zoteroStyle {
name = "din-1505-2";
sha256 = if scardanelli then
"1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq"
else
"150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi";
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
})
(zoteroStyle {
name = "apa";
sha256 = if scardanelli then
"0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk"
else
"1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8";
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
})
];
@@ -34,7 +28,6 @@ let
name = "dic/${name}";
inherit path;
}) dicts);
scardanelli = config.networking.hostName == "scardanelli";
in {
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
{
@@ -67,14 +60,19 @@ 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
# haskellPackages.pandoc-citeproc
nur.repos.kmein.text2pdf
lowdown
glow # markdown to term
libreoffice
unstable.pandoc
# gnumeric
dia
pandoc
# proselint
asciidoctor
wordnet
sdcv # stardict cli
# sdcv # stardict cli
];
}

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

@@ -0,0 +1,24 @@
{ pkgs, config, ... }:
let
suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend";
in
{
imports = [ <stockholm/krebs/3modules/power-action.nix> ];
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";

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

@@ -0,0 +1,218 @@
{ lib, pkgs, config, ... }:
let
inherit (import <niveum/lib>) tmpfilesConfig;
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;
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.xn--kiern-0qa.de" = {
enableACME = true;
forceSSL = true;
locations = lib.mkMerge (
[
{
"/".extraConfig = ''
default_type "text/html";
root ${pkgs.linkFarm "station-list" [{
name = "index.html";
path = import ./station-list.nix { inherit pkgs lib stations; };
}]};
index index.html;
'';
# skip
}
] ++ (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>
''

View File

@@ -1,10 +1,7 @@
{ config, pkgs, ... }: {
imports = [ <niveum/modules/retiolum.nix> ];
imports = [
<niveum/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

@@ -1,12 +1,14 @@
{ config, ... }:
with config.niveum; {
let
inherit (import <niveum/lib>) colours;
in{
home-manager.users.me.programs.rofi = {
enable = true;
separator = "solid";
scrollbar = false;
borderWidth = 0;
lines = 5;
font = "Monospace ${toString (fonts.size - 1)}";
font = "Monospace 10";
colors = rec {
window = rec {
background = colours.foreground;

View File

@@ -3,6 +3,7 @@
documentation.enable = false;
documentation.info.enable = false;
documentation.man.enable = false;
documentation.man.generateCaches = false;
fonts.fontconfig.enable = false;
nix.gc.automatic = true;
nix.optimise.automatic = true;

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 ];
}

7
configs/spacetime.nix Normal file
View File

@@ -0,0 +1,7 @@
{
time.timeZone = "Europe/Berlin";
location = {
latitude = 52.517;
longitude = 13.3872;
};
}

View File

@@ -1,42 +0,0 @@
{ pkgs, lib, ... }:
let
inherit (lib.strings) fileContents;
in {
environment.systemPackages = with pkgs; [ spotify spotify-tui playerctl ];
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix
systemd.user.services.spotifyd = let
spotifyd = pkgs.unstable.spotifyd.override {
withMpris = true;
withPulseAudio = true;
inherit (pkgs) libpulseaudio dbus;
};
spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI { } {
global = {
username = fileContents <secrets/spotify/username>;
password = fileContents <secrets/spotify/password>;
backend = "pulseaudio";
on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" ''
PATH=$PATH:${
lib.makeBinPath [ pkgs.playerctl pkgs.gawk pkgs.libnotify ]
}
metadata=$(playerctl metadata --player spotifyd)
title=$(echo "$metadata" | awk '/^xesam:title\s/ { print substr($0, index($0, $3)) }')
artist=$(echo "$metadata" | awk '/^xesam:artist\s/ { print substr($0, index($0, $3)) }' | paste --serial --delimiters "/")
album=$(echo "$metadata" | awk '/^xesam:album\s/ { print substr($0, index($0, $3)) }')
notify-send --app-name=" Spotify" "$title" "$artist $album"
'');
};
});
in {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "sound.target" ];
description = "spotifyd, a Spotify playing daemon";
serviceConfig = {
ExecStart =
"${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}";
Restart = "always";
RestartSec = 12;
};
};
}

27
configs/spotifyd.nix Normal file
View File

@@ -0,0 +1,27 @@
{ config, pkgs, lib, ... }:
{
imports = [ <niveum/modules/spotifyd.nix> ];
disabledModules = [ "services/audio/spotifyd.nix" ];
services.spotifyd = {
enable = true;
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

@@ -1,27 +1,12 @@
{ pkgs, config, lib, ... }:
let
sshPort = 22022;
kmeinKeys = lib.strings.splitString "\n" (lib.strings.fileContents (pkgs.fetchurl {
url = "https://github.com/kmein.keys";
sha256 = "1b9gbpgihg7zc89ivsz0gs3najp0zg53rcknvzvkm0851fdzkryx";
}));
inherit (import <niveum/lib>) sshPort kieran;
in {
services.xserver.displayManager.sessionCommands =
"${pkgs.openssh}/bin/ssh-add";
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
programs.ssh.startAgent = true;
services.openssh = {
ports = [ sshPort ];
enable = true;
passwordAuthentication = false;
forwardX11 = true;
};
users.motd = "Welcome to ${config.networking.hostName}!";
users.users.root.openssh.authorizedKeys.keys = kmeinKeys;
users.users.me.openssh.authorizedKeys.keys = kmeinKeys;
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
home-manager.users.me.programs.ssh = {
enable = true;
@@ -30,25 +15,38 @@ in {
hostname = "ssh.github.com";
port = 443;
};
scardanelli = {
hostname = "scardanelli.r";
user = "kfm";
zaatar = {
hostname = "zaatar.r";
user = "root";
port = sshPort;
};
homeros = {
hostname = "homeros.r";
makanek = {
hostname = "makanek.r";
user = "root";
port = sshPort;
};
manakish = {
hostname = "manakish.r";
user = "kfm";
port = sshPort;
};
toum = {
hostname = "toum.r";
user = "root";
port = sshPort;
};
kabsa = {
hostname = "kabsa.r";
user = "kfm";
port = sshPort;
};
wilde = {
hostname = "wilde.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";
};
};
};

16
configs/sshd.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
let
inherit (import <niveum/lib>) sshPort kieran;
in
{
users.motd = "Welcome to ${config.networking.hostName}!";
services.openssh = {
enable = true;
ports = [ sshPort ];
passwordAuthentication = false;
forwardX11 = true;
};
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
}

View File

@@ -3,8 +3,8 @@ let
autorenkalender-package = pkgs.fetchFromGitHub {
owner = "kmein";
repo = "autorenkalender";
rev = "1971f082ec6e14d392a0dc3ac62e0b1e4187409b";
sha256 = "0hipj616vcsa3f62s83jvlx8zx4bmbgl5h2n4w8ba5ngp40lkmb3";
rev = "cf49a7b057301332d980eb47042a626add93db66";
sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs";
};
autorenkalender =
pkgs.python3Packages.callPackage autorenkalender-package { };

View File

@@ -0,0 +1,59 @@
{ config, pkgs, lib, ... }:
let
telebots = let
telebots-package = pkgs.fetchFromGitHub {
owner = "kmein";
repo = "telebots";
rev = "22931c9457e092c4e413555dbe61819d77844246";
sha256 = "0byp3w6li3fin7ry0ki4rmgkaajdil424y5pc1j7ci9mpws0s5ik";
};
in pkgs.callPackage telebots-package {};
reverseDirectory = "/run/telegram-reverse";
proverbDirectory = "/run/telegram-proverb";
inherit (import <niveum/lib>) tmpfilesConfig;
in {
imports = [
./literature-quote.nix
./autorenkalender.nix
./nachtischsatan.nix
./tlg-wotd.nix
<niveum/modules/telegram-bot.nix>
];
systemd.tmpfiles.rules = map (path: tmpfilesConfig {
type = "d";
mode = "0750";
age = "1h";
inherit path;
}) [ reverseDirectory proverbDirectory ];
systemd.services.telegram-reverse = {
wantedBy = [ "multi-user.target" ];
description = "Telegram reverse bot";
path = [ pkgs.ffmpeg ];
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/reverse.token>;
enable = true;
script = "${telebots}/bin/telegram-reverse";
serviceConfig.Restart = "always";
serviceConfig.WorkingDirectory = reverseDirectory;
};
systemd.services.telegram-betacode = {
wantedBy = [ "multi-user.target" ];
description = "Telegram beta code bot";
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/betacode.token>;
enable = true;
script = "${telebots}/bin/telegram-betacode";
serviceConfig.Restart = "always";
};
systemd.services.telegram-proverb = {
wantedBy = [ "multi-user.target" ];
description = "Telegram proverb bot";
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/proverb.token>;
enable = true;
script = "${telebots}/bin/telegram-proverb";
serviceConfig.Restart = "always";
serviceConfig.WorkingDirectory = proverbDirectory;
};
}

View File

@@ -4,24 +4,20 @@ let
pkgs.writers.writePython3 "nachtischsatan-bot" {
libraries = [ pkgs.python3Packages.python-telegram-bot ];
} ''
from telegram.ext import Updater, MessageHandler
from telegram.ext.filters import Filters
import random
import time
from telegram.ext import Updater, MessageHandler
from telegram.ext.filters import Filters
def flubber(bot, update):
def flubber(update, context):
time.sleep(random.randrange(4000) / 1000)
update.message.reply_text("*flubberflubber*")
updater = Updater(
'${token}'
)
updater = Updater('${token}')
updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber))
updater.start_polling()
updater.idle()
'';

View File

@@ -0,0 +1,17 @@
{ pkgs, lib, ... }:
{
niveum.telegramBots.tlg-wotd = {
enable = true;
time = "9:30";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = [ "@tlgwotd" ];
command = toString (pkgs.writers.writeDash "tlg-wotd" ''
${pkgs.curl}/bin/curl -sSL http://stephanus.tlg.uci.edu/Iris/Wotd \
| ${pkgs.recode}/bin/recode html..utf8 \
| ${pkgs.jq}/bin/jq -r '
"*\(.word)* '\'''\(.definition | rtrimstr(" "))'\'''\n\nFirst occurrence: \(.firstOccurrence)\nNumber of occurrences: \(.totalOccurrences)"
'
'');
parseMode = "Markdown";
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#151515";
dark = "#000000";
};
red = {
bright = "#de575c";
dark = "#de575c";
};
yellow = {
bright = "#ebe971";
dark = "#ebe971";
};
green = {
bright = "#00b853";
dark = "#00b853";
};
blue = {
bright = "#90d0f0";
dark = "#7fc6f0";
};
magenta = {
bright = "#cf9ffa";
dark = "#cf9ffa";
};
cyan = {
bright = "#4ae5e8";
dark = "#4ae5e8";
};
white = {
bright = "#ffffff";
dark = "#bbbbbb";
};
background = black.dark;
foreground = white.dark;
cursor = green.bright;
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = {
black = {
bright = "#444444";
dark = "#1c1c1c";
};
red = {
bright = "#ff8700";
dark = "#af5f5f";
};
green = {
bright = "#87af87";
dark = "#5f875f";
};
yellow = {
bright = "#ffffaf";
dark = "#87875f";
};
blue = {
bright = "#8fafd7";
dark = "#5f87af";
};
magenta = {
bright = "#8787af";
dark = "#5f5f87";
};
cyan = {
bright = "#5fafaf";
dark = "#5f8787";
};
white = {
bright = "#999999";
dark = "#6c6c6c";
};
background = "#262626";
foreground = "#bcbcbc";
cursor = "#bcbcbc";
};
}

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