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

120 Commits

Author SHA1 Message Date
45644518bb feat(urlwatch): remove arnshaugk due to spam 2022-12-01 20:52:37 +01:00
77ddd1d02f feat(urlwatch): remove tatort due to spam 2022-12-01 20:52:15 +01:00
0f5e0e8d6f chore: update retiolum 2022-12-01 20:00:05 +01:00
de066361b7 feat(prometheus): make reachable via http 2022-12-01 19:58:59 +01:00
ba3a139f8e feat(tt-rss): disable registration 2022-12-01 18:25:43 +01:00
91fa6faeaf feat(nextcloud): set email via module 2022-12-01 18:25:33 +01:00
e95546ef8a feat(nextcloud): upgrade 2022-12-01 18:25:16 +01:00
b9623e3d57 feat(alertmanager): access via http 2022-12-01 18:25:03 +01:00
73929c1963 feat(newsboat): star flag s 2022-12-01 18:24:19 +01:00
3197a5a232 feat(prometheus): use node exporter firewall option 2022-12-01 18:24:05 +01:00
6a605633ae chore: update retiolum 2022-12-01 17:07:44 +01:00
52376128a5 feat(alertmanager): report via email like a professional, allow http access 2022-12-01 17:07:06 +01:00
4a5bc2d89d feat: update to 22.11 2022-12-01 17:07:06 +01:00
3ec22d6ef0 feat(journald): save space on journal 2022-12-01 17:04:12 +01:00
3c86532a5d feat(nextcloud): try to log stuff 2022-12-01 13:37:46 +01:00
a34b4a8262 feat: use owickstrom colours 2022-11-30 12:39:45 +01:00
3102d6f56c fix(alacritty): use correct config path 2022-11-30 11:44:39 +01:00
a2b65034bf fix(nextcloud): do not sync paychecks anymore 2022-11-30 11:23:07 +01:00
90550dc18b feat: atuin 2022-11-30 11:21:38 +01:00
03d40a488b chore: permit insecure qtwebkit 2022-11-30 09:19:30 +01:00
74191a27ee Merge remote-tracking branch 'origin/update_flake_lock_action' 2022-11-30 07:42:47 +01:00
a33db562c4 feat(alacritty): make faster 2022-11-29 22:51:09 +01:00
93cc209e52 feat: clipmenu 2022-11-29 22:50:49 +01:00
d1b5b0c25c feat(newsboat): starred tt-rss 2022-11-29 13:58:42 +01:00
ff5bc035c0 feat(tt-rss): correct name, add secret to ci 2022-11-29 13:55:56 +01:00
e06e7bbe0d feat(i3): more github stuff is important 2022-11-29 12:00:35 +01:00
8786bfad24 feat(moodle-dl): borsfaye 2022-11-28 12:54:30 +01:00
github-actions[bot]
10949f7746 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817' (2022-10-29)
  → 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
• Updated input 'home-manager':
    'github:nix-community/home-manager/722e8d65d3aba6f527100cc2d1539e4ca04d066f' (2022-10-31)
  → 'github:nix-community/home-manager/e999dfe7cba2e1fd59ab135e7496545bd4f82b76' (2022-11-27)
• Updated input 'home-manager/utils':
    'github:numtide/flake-utils/6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817' (2022-10-29)
  → 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/26eb67abc9a7370a51fcb86ece18eaf19ae9207f' (2022-10-30)
  → 'github:NixOS/nixpkgs/695b3515251873e0a7e2021add4bba643c56cde3' (2022-11-25)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/412b9917cea092f3d39f9cd5dead4effd5bc4053' (2022-10-30)
  → 'github:NixOS/nixpkgs/5dc7114b7b256d217fe7752f1614be2514e61bb8' (2022-11-25)
• Updated input 'scripts':
    'github:kmein/scripts/66b2068d548d3418c81dd093bba3f80248c68196' (2022-10-12)
  → 'github:kmein/scripts/84ad80348294e9423996b52a4b112700ae5d3176' (2022-11-23)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=a83dec755ca2753705254f90346e4441d2f25c7c' (2022-10-31)
  → 'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=dae12b6893a1d28e8bcb1fe3fb9ee8757bbfbed4' (2022-11-24)
2022-11-27 00:55:59 +00:00
12e3529df8 fix(celan): send at random time 2022-11-26 11:35:58 +01:00
4b954a7e83 fix(tabula): networking, sound 2022-11-25 11:27:43 +01:00
ce99920054 feat: celan telegram bot 2022-11-25 11:27:16 +01:00
c3c0792d50 feat: init tabula 2022-11-25 09:16:02 +01:00
851a9edc4d chore: update retiolum 2022-11-25 09:15:42 +01:00
e69668606e feat(streams): rename радио русский берлин 2022-11-22 19:31:21 +01:00
52d73abe06 feat: fq 2022-11-22 11:48:15 +01:00
bf899d0bde feat(i3): envs.sh 2022-11-22 11:48:09 +01:00
dcf2fa523b feat(tt-rss): replace freshrss 2022-11-16 11:21:22 +01:00
cae4423fb3 feat(freshrss): run from unstable, use with newsboat 2022-11-16 10:03:55 +01:00
25b37c2b01 feat(freshrss): host on makanek 2022-11-14 23:07:19 +01:00
a4e0e25465 feat: add termdown 2022-11-09 11:07:58 +01:00
4fa3a3e5fc feat(xkb): add hebrew 2022-11-09 11:07:44 +01:00
4950442f8b feat(i3): highlight borders blue 2022-11-08 20:31:16 +01:00
7252826719 feat(i3): no gaps 2022-11-08 20:31:04 +01:00
a22acd2073 feat(i3): no no startup id 2022-11-08 20:30:53 +01:00
9e85a12084 fix(i3): remove title bars 2022-11-08 20:30:28 +01:00
600d8a5f7d fix: temporarily disable trådfri 2022-11-08 06:41:27 +01:00
857518578a feat(fzf): do not ignore vcs and follow links 2022-11-07 15:44:18 +01:00
b1fcbcaa96 feat(xkb): add coptic, avestan, devanagari 2022-11-07 15:42:40 +01:00
005e193f56 fix(menstruation): update 2022-11-07 11:29:10 +01:00
6e5ff9214e chore: update 2022-11-01 09:45:06 +01:00
85f3722ba5 feat(nextcloud): sync fysi documents 2022-11-01 07:55:06 +01:00
797d091643 fix(tlg-wotd) 2022-10-28 07:45:40 +02:00
b1544906aa feat(moodle-dl): WS22 course 2022-10-25 07:39:19 +02:00
c886511c99 feat: json2csv script 2022-10-19 08:56:47 +02:00
7388395908 feat(graph.r): update to show pois on map 2022-10-19 08:56:39 +02:00
bf42e37daa Merge pull request #27 from kmein/update_flake_lock_action
flake.lock: Update
2022-10-18 20:42:11 +02:00
035fa9e29d chore: update scripts 2022-10-18 10:11:18 +02:00
cc28b894d1 fix(menstruation): update 2022-10-18 10:10:57 +02:00
c1c1665e50 feat(moinbot): randomize greeting 2022-10-18 10:10:57 +02:00
2dca2596cd feat(onomap): allow multiple names 2022-10-18 10:10:56 +02:00
github-actions[bot]
bede997e7d flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/a7f0cc2d7b271b4a5df9b9e351d556c172f7e903' (2022-09-30)
  → 'github:nix-community/home-manager/2ecb3ea990cf737cfb42d8cd805fa86347c1afaf' (2022-10-15)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/9cac45850280978a21a3eb67b15a18f34cbffa2d' (2022-10-01)
  → 'github:NixOS/nixpkgs/e06bd4b64bbfda91d74f13cb5eca89485d47528f' (2022-10-12)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90' (2022-09-22)
  → 'github:NixOS/nixpkgs/4428e23312933a196724da2df7ab78eb5e67a88e' (2022-10-14)
• Updated input 'retiolum':
    'github:krebs/retiolum/86208b5a747d7aa661240b2d5c2f229f2ed76959' (2022-09-28)
  → 'github:krebs/retiolum/289712a3becfec77dab8963d450b2afe616569e0' (2022-10-12)
• Updated input 'scripts':
    'github:kmein/scripts/86c71080945e5b637d9dde5c3d944d600035e2eb' (2022-10-09)
  → 'github:kmein/scripts/66b2068d548d3418c81dd093bba3f80248c68196' (2022-10-12)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=8f929b04b3de012a9c72306786f076b78aa9f98c' (2022-09-27)
  → 'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=0d32cceb996dc3b91342ce9d0aa2df1b234522fa' (2022-10-12)
2022-10-16 01:15:33 +00:00
0082602131 feat(smyth): only once per day 2022-10-14 15:20:19 +02:00
8ffeddb46b chore(onomap): remove unused variable 2022-10-09 07:14:36 +02:00
c06e37f40a feat(onomap): allow multiple names 2022-10-07 02:23:54 +02:00
8d36a77405 fix: downgrade unstable because i dont want to damage my display
https://lore.kernel.org/all/YzwooNdMECzuI5+h@intel.com/
2022-10-06 11:07:20 +02:00
1219517d62 fix(vimPlugins): name -> pname 2022-10-06 11:07:20 +02:00
786d1df781 fix: pkgconfig -> pkg-config 2022-10-06 10:53:11 +02:00
c49859900a fix: utillinux -> util-linux 2022-10-06 10:37:21 +02:00
f9ce538975 fix: posix_man_pages -> man-pages-posix 2022-10-06 10:32:31 +02:00
7d6e7ae1a2 fix: xdg_utils -> xdg-utils 2022-10-06 10:32:30 +02:00
176958cd75 fix: iproute -> iproute2 2022-10-06 10:31:26 +02:00
816c21d7de fix: gnome3 -> gnome 2022-10-06 09:41:25 +02:00
3b1f4799e0 fix(hesychius): update scripts 2022-10-06 08:17:14 +02:00
c52df45b4f fix(ful): disable systemd-networkd-wait-online 2022-10-06 07:17:48 +02:00
84f83cb6ac Merge pull request #26 from kmein/update_flake_lock_action
flake.lock: Update
2022-10-05 22:49:37 +02:00
652b7d4852 fix(rofi-pass): generate passwords, correct default user 2022-10-05 17:09:34 +02:00
e73c139d69 feat(rofi-pass): allow insertion 2022-10-05 17:08:58 +02:00
549282140f fix(rofi-pass): include via home-manager
also fix https://github.com/carnager/rofi-pass/issues/226
2022-10-05 16:50:27 +02:00
f3bb52e820 feat: we may want to eat fast food on tuesdays 2022-10-04 10:59:17 +02:00
717672e86e feat: calendars script 2022-10-03 19:14:21 +02:00
1cee1c06f7 feat(moodle-dl): WS22 course 2022-10-03 19:14:11 +02:00
4d5989aa5b feat(neomutt): alias for faster access of single accounts 2022-10-03 19:13:57 +02:00
01bdeb05b7 kabsa: new SD card 2022-10-02 09:59:10 +02:00
5c422e74e8 feat: new DR streams, playlist for Record 2022-10-02 09:58:59 +02:00
github-actions[bot]
be3795e957 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/de3758e31a3a1bc79d569f5deb5dac39791bf9b6' (2022-09-23)
  → 'github:nix-community/home-manager/a7f0cc2d7b271b4a5df9b9e351d556c172f7e903' (2022-09-30)
• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/7e27b838cd7ac90fed03d0d5a8487848c4b0b6d2' (2022-09-23)
  → 'github:NixOS/nixpkgs/9cac45850280978a21a3eb67b15a18f34cbffa2d' (2022-10-01)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90' (2022-09-22)
  → 'github:NixOS/nixpkgs/10ecda252ce1b3b1d6403caeadbcc8f30d5ab796' (2022-09-30)
• Updated input 'recht':
    'github:kmein/recht/d551afed23122bb3106e59eb2274394ec5555048' (2021-04-28)
  → 'github:kmein/recht/dc2cb407052a53965e6678fd84f0d887f887c11c' (2022-09-28)
• Updated input 'retiolum':
    'github:krebs/retiolum/8d9b86a0ce503588bb34ae8676fdbcb0e4014119' (2022-09-24)
  → 'github:krebs/retiolum/86208b5a747d7aa661240b2d5c2f229f2ed76959' (2022-09-28)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=55957c6d6adb51d2079c117c1e7309c60ee0fe0f' (2022-09-19)
  → 'git+https://cgit.lassul.us/stockholm?ref=refs%2fheads%2fmaster&rev=8f929b04b3de012a9c72306786f076b78aa9f98c' (2022-09-27)
2022-10-02 01:16:36 +00:00
6063f4c90b feat(ssh): use fysiweb identity for ip login on dev1 2022-09-28 15:54:42 +02:00
7c4557331f feat(newsboat): hooktube is no more 2022-09-28 15:54:21 +02:00
8a7e4386fb fix(newsboat): call link handler 2022-09-28 14:15:39 +02:00
61ab528d56 feat: screencap script 2022-09-28 09:34:17 +02:00
032810109c fix(ci): add mega password 2022-09-27 22:28:58 +02:00
6b0bb6a806 feat(cloud): add script for browsing mega 2022-09-27 22:07:03 +02:00
7ce64d461c fix(notemenu): do not show hidden files 2022-09-27 20:40:24 +02:00
51afd41254 fix(notement): correctly handle files with spaces 2022-09-27 19:36:22 +02:00
eb4fa1b9bd feat(nextcloud): disable gui client 2022-09-27 19:19:14 +02:00
ac7a4b2aa5 feat(nextcloud): sync nextcloud notes periodically 2022-09-27 19:18:42 +02:00
89a4b13b2d feat: bye ncdu, hi gdu 2022-09-27 19:17:30 +02:00
f5da2dffd8 feat(newsboat): add odysee to linkhandler 2022-09-27 09:47:50 +02:00
cdf42df7c1 feat(bin): add tuesday script 2022-09-26 09:40:12 +02:00
3ccf0cfe9a feat(bin): add prospekte script 2022-09-26 09:39:59 +02:00
83632cbd9c feat(ful): monitoring 2022-09-26 09:30:28 +02:00
github-actions[bot]
092879a425 flake.lock: Update
Flake lock file updates:

• Updated input 'nixos-stable':
    'github:NixOS/nixpkgs/bcc68429a50c4ac051920c72c60e417202c19d79' (2022-09-22)
  → 'github:NixOS/nixpkgs/7e27b838cd7ac90fed03d0d5a8487848c4b0b6d2' (2022-09-23)
• Updated input 'retiolum':
    'github:krebs/retiolum/c4d6b07be29b3b9267027ed25792a2cb350459d5' (2022-08-16)
  → 'github:krebs/retiolum/8d9b86a0ce503588bb34ae8676fdbcb0e4014119' (2022-09-24)
2022-09-25 01:04:02 +00:00
c6a45b421b feat: update 2022-09-23 23:31:27 +02:00
b5addef848 fix: dont get scripts from overlay 2022-09-23 23:31:14 +02:00
e2cf761aea feat: more transits 2022-09-23 09:54:58 +02:00
868dc8a4aa feat(moodle-dl): disable for borsfaye 2022-09-23 09:32:29 +02:00
dfd4bb0ca8 chore: get also otf from fonts 2022-09-23 09:32:29 +02:00
3e03688c81 feat: reenable transits 2022-09-23 09:32:21 +02:00
3136002449 feat: wrap jsesh 2022-09-19 22:04:52 +02:00
4cbd2fee7d WIP(fonts): install egyptological fonts 2022-09-19 22:04:37 +02:00
565c73bd05 feat(fonts): add emojifont to terminal 2022-09-19 07:29:47 +02:00
e5f933977c feat(unicodmenu): update to unicode 15 2022-09-19 07:29:12 +02:00
736b289643 feat(rofi): light theme 2022-09-19 07:28:57 +02:00
e0e0dd9e34 feat(fonts): cardo 2022-09-16 09:27:47 +02:00
1e2613b838 feat(newsboat): reload in parallel 2022-09-15 12:22:38 +02:00
f41ddb654a we dont need no procrastination 2022-09-13 21:01:32 +02:00
41ecca8411 feat(weechat): authenticate @ news.r 2022-09-13 21:01:16 +02:00
a80f4d866a chore: update 2022-09-13 20:30:07 +02:00
f56e9aa37b feat(todo): add procrastination 2022-09-12 12:36:14 +02:00
822b0df4b8 feat(i3): dock i3bar 2022-09-10 21:51:16 +02:00
c16123dc8d feat: automate entering ssh passphrase 2022-09-08 12:46:44 +02:00
75 changed files with 1057 additions and 376 deletions

19
.bin/calendars.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
directory="$(mktemp -d)"
trap clean EXIT
clean() {
rm -rf "$directory"
}
year=2022
output=/tmp/$year.pdf
for month in $(seq 1 12); do
printf "\r%d" "$month" 1>&2
astrolog -zN Berlin -qm "$month" "$year" -X -K -XA -R Uranus Neptune Pluto -Xr -Xm -Xb -Xo "$(printf "%s/%02d.bmp" "$directory" "$month")" -Xw 1080 720 2>/dev/null
done
printf "\r"
convert "$directory/*.bmp" "$output"
echo "$output"

5
.bin/json2csv.jq Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env -S jq -r -f
(map(keys) | add | unique) as $cols
| map(. as $row | $cols | map($row[.])) as $rows
| $cols, $rows[]
| @csv

65
.bin/prospekte.sh Executable file
View File

@@ -0,0 +1,65 @@
#!/bin/sh
lidl() {
echo LIDL
curl -sSL 'https://endpoints.lidl-flyer.com/v3/region-overview/lidl/de-DE/0.json' \
| jq -r '
.categories
| map(select(.name == "Filial-Angebote") | .subcategories | map(.flyers))
| flatten
| flatten
| .[]
| .pdfUrl
'
}
aldi_nord() {
echo ALDI nord
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-aktuell/GetPDF.ashx'
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-vorschau/GetPDF.ashx'
}
rewe_berlin() {(
store_id=662366923
publisher_id=1062
echo REWE
curl -sSL 'https://www.bonialserviceswidget.de/de/stores/'$store_id'/brochures?storeId='$store_id'&publisherId='$publisher_id | while read -r brochure_id; do
curl -sSL 'https://www.bonialserviceswidget.de/de/v5/brochureDetails/'"$brochure_id"'?publisherId='$publisher_id | jq -r .pdfUrl
done
)}
kaufland() {(
region_code=8920
echo KAUFLAND
curl -sSL https://filiale.kaufland.de/prospekte.html | htmlq --attribute href '.flyer a' | grep -Eo 'DE_de_KDZ[^/]*' | sed "s/_3000_/_${region_code}_/" | while read -r flyer_id; do
curl -sSL "https://endpoints.leaflets.kaufland.com/v3/$flyer_id/flyer.json?regionCode=$region_code" | jq -r .flyer.pdfUrl
done
)}
netto_schwarz() {
echo 'NETTO (schwarz)'
curl -sSL 'https://squid-api.tjek.com/v2/catalogs?dealer_ids=90f2VL&order_by=created' \
| jq -r '.[] | .id' \
| while read -r flyer_id; do
curl -sSL "https://squid-api.tjek.com/v2/catalogs/$flyer_id/download" \
| jq -r .pdf_url
done
}
dir="$(mktemp -d)"
trap clean EXIT
clean() {
rm -rf "$dir"
}
prospekt_url="$( (
lidl
aldi_nord
rewe_berlin
kaufland
netto_schwarz
) | fzf)"
curl -sSL "$prospekt_url" -o "$dir/prospekt.pdf"
zathura "$dir/prospekt.pdf"

16
.bin/screencap.sh Executable file
View File

@@ -0,0 +1,16 @@
#! /usr/bin/env nix-shell
#! nix-shell -i sh -p coreutils byzanz xorg.xwininfo gnused
# shellcheck shell=sh
# ref https://gist.github.com/aforemny/0994cb7f06ea30d56c8b9681ff5d2054
set -eux
eval "$(xwininfo | \
sed -n -e 's/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p' \
-e 's/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p' \
-e 's/^ \+Width: \+\([0-9]\+\).*/w=\1/p' \
-e 's/^ \+Height: \+\([0-9]\+\).*/h=\1/p')"
trap "pkill -f 'sleep 360d'" INT
byzanz-record -e "sleep 360d" -c -x $x -y $y -w $w -h $h "$@"

50
.bin/toposort.nix Normal file
View File

@@ -0,0 +1,50 @@
let
lib = import <nixpkgs/lib>;
in rec {
inherit lib;
input = [
{
x = ["pool" "zfs"];
y = ["mdadm" "raid1"];
}
{
x = ["pool" "zfs"];
y = ["disk" "sda"];
}
{
x = ["mdadm" "raid1"];
y = ["disk" "sdb"];
}
{
x = ["mdadm" "raid1"];
y = ["disk" "sdc"];
}
];
outNodes = node: graph:
lib.unique
(builtins.map (e: e.y)
(builtins.filter (v: v.x == node) graph));
vertices = graph:
lib.unique
(builtins.map (x: x.y) graph ++ builtins.map (x: x.x) graph);
deleteVertex = node: graph: (builtins.filter (v: v.x != node && v.y != node) graph);
findSink = graph:
lib.findFirst
(v: outNodes v graph == [])
(lib.trace graph (builtins.abort "No sink found"))
(vertices graph);
topSort = graph:
if graph == []
then []
else if builtins.length graph == 1
then let only = builtins.head graph; in [only.y only.x]
else let sink = findSink graph; in [sink] ++ topSort (deleteVertex sink graph);
output = topSort input;
}

18
.bin/ttrss-unread Executable file
View File

@@ -0,0 +1,18 @@
#/usr/bin/env -S deno run -A:q
set -x
session_cache="$HOME/.cache/tt-rss.session"
ttrss_endpoint=https://feed.kmein.de/api/
ttrss_user=k
ttrss_password=$(pass shared/tt-rss/password)
login() {
if [ -f "$session_cache" ]; then
session_id="$(cat "$session_cache")"
else
session_id="$(curl -d '{"op":"login","user":"'"$ttrss_user"'","password":"'"$ttrss_password"'"}' "$ttrss_endpoint" | jq -r .content.session_id)"
echo "$session_id" > "$session_cache"
fi
}
login
curl -d '{"sid":"'"$session_id"'","op":"getUnread"}' "$ttrss_endpoint" | jq .content

16
.bin/tuesday-1800 Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -efux
expected_max_results=1024 # the upper bound on the number of restaurants
radius=250
echo '[out:json];node(id:260050809)->.cbase;
(
node(around.cbase:'$radius')[amenity=fast_food];
node(around.cbase:'$radius')[amenity=restaurant];
);out;' \
| curl -sSL -d @- -X POST http://overpass-api.de/api/interpreter \
| jq --argjson random "$(shuf -i 0-$expected_max_results -n 1)" '
.elements
| length as $length
| .[$random % $length]
'

6
ci.nix
View File

@@ -46,23 +46,27 @@
"mail/meinhaki"
"mail/dslalewa"
"mail/posteo"
"mega/password"
"nextcloud-fysi/password"
"nextcloud/password"
"openweathermap.key"
"restic/password"
"traadfri.key"
"tt-rss/password"
"tt-rss/private-rss.key"
"wifi/Aether.psk"
"spotify/username"
"spotify/password"
];
systemSecrets = let
basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"];
basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem" "ssh/passphrase"];
in
{
zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic);
kabsa = ensureFiles basic;
manakish = ensureFiles basic;
tahina = ensureFiles basic;
tabula = ensureFiles basic;
ful = ensureFiles (["root.password"] ++ basic);
makanek = ensureFiles ([
"irc/retiolum"

View File

@@ -6,7 +6,7 @@
}: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
window.opacity = 0.95;
window.opacity = 0.99;
font = {
normal.family = "Monospace";
size = 6;
@@ -43,6 +43,7 @@
name = "alacritty";
paths = [
(pkgs.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml msg create-window "$@" ||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
@@ -56,7 +57,7 @@ in {
];
environment.etc = {
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-dark.nix>);
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-light.nix>);
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/owickstrom-dark.nix>);
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/owickstrom-light.nix>);
};
}

21
configs/clipboard.nix Normal file
View File

@@ -0,0 +1,21 @@
{
config,
pkgs,
...
}: {
services.clipmenu.enable = true;
# synchronize all the clipboards
systemd.user.services.autocutsel = {
enable = true;
wantedBy = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "forking";
ExecStart = pkgs.writers.writeDash "autocutsel" ''
${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY
${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD
'';
};
};
}

View File

@@ -15,14 +15,6 @@ in {
};
systemd.tmpfiles.rules = map tmpfilesConfig [
{
type = "L+";
user = config.users.users.me.name;
group = "users";
mode = "0755";
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
path = "${config.users.users.me.home}/notes";
}
{
type = "L+";
user = config.users.users.me.name;
@@ -42,9 +34,9 @@ in {
];
home-manager.users.me = {
services.gnome-keyring.enable = true;
services.gnome-keyring.enable = false;
services.nextcloud-client = {
enable = true;
enable = false;
startInBackground = true;
};
systemd.user.services.nextcloud-client = {
@@ -55,6 +47,28 @@ in {
};
};
systemd.user.services.nextcloud-syncer = {
enable = true;
wants = ["network-online.target"];
wantedBy = ["default.target"];
startAt = "*:00/10";
script = let
kieran = {
user = "kieran";
password = lib.fileContents <secrets/nextcloud/password>;
endpoint = "https://cloud.xn--kiern-0qa.de";
target = "${config.users.users.me.home}/notes";
};
in ''
mkdir -p ${lib.escapeShellArg kieran.target}
${pkgs.nextcloud-client}/bin/nextcloudcmd --non-interactive --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint}
'';
serviceConfig = {
Type = "oneshot";
Restart = "on-failure";
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "book" ''
set -efu
@@ -62,8 +76,32 @@ in {
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/syncthing/library -type f
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/Seafile/Books -type f
} | ${pkgs.fzf}/bin/fzf)"
${pkgs.zathura}/bin/zathura "$book"
exec ${pkgs.zathura}/bin/zathura "$book"
'')
(let
kieran = {
user = "kieran.meinhardt@gmail.com";
password = lib.fileContents <secrets/mega/password>;
};
megatools = command: "${pkgs.megatools}/bin/megatools ${command} --username ${lib.escapeShellArg kieran.user} --password ${lib.escapeShellArg kieran.password}";
in
pkgs.writers.writeDashBin "book-mega" ''
set -efu
selection="$(${megatools "ls"} | ${pkgs.fzf}/bin/fzf)"
test -n "$selection" || exit 1
tmpdir="$(mktemp -d)"
trap clean EXIT
clean() {
rm -rf "$tmpdir"
}
(
cd "$tmpdir"
${megatools "get"} "$selection"
exec ${pkgs.zathura}/bin/zathura "$(basename "$selection")"
)
'')
];
fileSystems."/media/moodle" = {

View File

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

View File

@@ -7,6 +7,7 @@
}: let
inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses kieran;
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
in {
imports = [
<home-manager/nixos>
@@ -30,22 +31,11 @@ in {
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
rofi-pass = pkgs.rofi-pass.overrideAttrs (final: previous: {
patches = [
# password store androi
<niveum/packages/rofi-pass.patch>
];
});
};
permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
];
};
overlays = [
(self: super: {
scripts = import <niveum/packages/scripts> {
pkgs = super;
lib = super.lib;
};
})
];
};
}
{
@@ -121,13 +111,13 @@ in {
cd "$(mktemp -d)"
pwd
'';
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
in {
"ß" = "${pkgs.utillinux}/bin/setsid";
"ß" = "${pkgs.util-linux}/bin/setsid";
cat = "${pkgs.bat}/bin/bat --style=plain";
chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
cp = "cp --interactive";
ip = "${pkgs.iproute}/bin/ip -c";
ip = "${pkgs.iproute2}/bin/ip -c";
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";
@@ -135,7 +125,7 @@ in {
mv = "mv --interactive";
nixi = "nix repl '<nixpkgs>'";
ns = "nix-shell --run zsh";
o = "${pkgs.xdg_utils}/bin/xdg-open";
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 --interactive";
@@ -231,8 +221,8 @@ in {
./ccc.nix
./khal.nix
./chromium.nix
./clipboard.nix
./cloud.nix
./copyq.nix
./compton.nix
./direnv.nix
./distrobump.nix
@@ -273,7 +263,7 @@ in {
./nsxiv.nix
./themes.nix
./tmux.nix
./traadfri.nix
# ./traadfri.nix
./unclutter.nix
./vscode.nix
./watson.nix

View File

@@ -74,7 +74,7 @@ in {
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
${pkgs.dmenu}/bin/dmenu -i -p flix -l 5 "$@" < ${cacheLocation}/${indexFilename} \
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.utillinux}/bin/setsid ${pkgs.xdg_utils}/bin/xdg-open '{}'
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.util-linux}/bin/setsid ${pkgs.xdg-utils}/bin/xdg-open '{}'
'')
];
}

View File

@@ -1,4 +1,52 @@
{pkgs, ...}: {
{pkgs, ...}: let
zip-font = name: arguments: let
directory = pkgs.fetchzip arguments;
in
pkgs.runCommand name {} ''
mkdir -p $out/share/fonts/{truetype,opentype,woff}
${pkgs.findutils}/bin/find ${directory} -name '*.ttf' -exec install '{}' $out/share/fonts/truetype \;
${pkgs.findutils}/bin/find ${directory} -name '*.otf' -exec install '{}' $out/share/fonts/opentype \;
${pkgs.findutils}/bin/find ${directory} -name '*.woff' -exec install '{}' $out/share/fonts/woff \;
'';
simple-ttf = name: arguments: let
file = pkgs.fetchurl arguments;
in
pkgs.runCommand name {} ''
mkdir -p $out/share/fonts/truetype
install ${file} $out/share/fonts/truetype
'';
egyptianHiero = zip-font "EgyptianHiero" {
url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "0xaq16ysvxrkcn3264wkmm2ln0hpijpk4iq1n5i7d9gqhjhsav1x";
};
antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw";
stripRoot = false;
};
newGardiner = zip-font "NewGardiner" {
url = "https://mjn.host.cs.st-andrews.ac.uk/egyptian/fonts/NewGardiner.zip";
sha256 = "1jd0qa6shh9pqqyig2w43m9l9rv1i50l73jzkhb6g6mqxbhb1mip";
stripRoot = false;
};
junicode2 = zip-font "JunicodeTwo" {
url = "https://github.com/psb1558/Junicode-font/archive/48bf476db278c844c67542b04d1e0e4c71f139d2.zip";
sha256 = "1ryicc155vkvgv3315ddliigwa01afwyb4c4f6pnqcns03af001i";
};
newAthenaUnicode = zip-font "NewAthenaUnicode" {
url = "https://classicalstudies.org/sites/default/files/userfiles/files/NAU5_005.zip";
sha256 = "1g7qk9gl4nq2dz41bvck1nzilhin44j8691cxax3dlp77bbn9bxr";
};
jsesh = simple-ttf "JSesh" {
url = "http://files.qenherkhopeshef.org/jsesh/JSeshFont.ttf";
sha256 = "1203jrk2xzvgckcc5hx88kja1i3h8gm1wiyla5j6gspc0hbv56ry";
};
egyptianText = simple-ttf "EgyptianText-1.0beta" {
url = "http://c.krebsco.de/EgyptianText-v1.0-beta.ttf";
sha256 = "0cfjbk7xxnxhlp6v922psm5j1xzrv6wfk226ji2wz2yfrnkbcbsv";
};
in {
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
@@ -7,13 +55,22 @@
alegreya-sans
amiri
annapurna-sil
antinoou
cantarell-fonts
cardo
charis-sil
doulos-sil
newAthenaUnicode
corefonts
crimson
eb-garamond
jsesh
egyptianHiero
egyptianText
font-awesome_6
etBook
newGardiner
junicode2
ezra-sil
fira
font-awesome
@@ -44,11 +101,11 @@
vollkorn
zilla-slab
]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = {
monospace = ["Noto Sans Mono"];
fontconfig.defaultFonts = rec {
monospace = ["Noto Sans Mono"] ++ emoji;
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
emoji = ["Noto Color Emoji" "Noto Emoji"];
emoji = ["Noto Color Emoji"];
};
};
}

View File

@@ -5,18 +5,19 @@
}: {
environment = {
systemPackages = [pkgs.fzf];
variables = {
variables = rec {
FZF_DEFAULT_COMMAND = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
FZF_DEFAULT_OPTS =
lib.escapeShellArgs ["--height=40%" "--layout=reverse"];
lib.escapeShellArgs ["--height=40%"];
FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d";
FZF_ALT_C_OPTS = lib.escapeShellArgs [
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
"--bind=space:toggle-preview"
"--preview-window=hidden"
];
FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f";
FZF_CTRL_T_COMMAND = FZF_DEFAULT_COMMAND;
FZF_CTRL_T_OPTS =
lib.escapeShellArgs ["--preview='${pkgs.bat}/bin/bat \"{}\"'"];
lib.escapeShellArgs ["--preview='head -$LINES {}'"];
};
};

View File

@@ -5,6 +5,7 @@
...
}: let
inherit (import <niveum/lib>) defaultApplications colours;
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
klem = import <niveum/packages/scripts/klem.nix> {
inherit pkgs lib;
config.scripts = {
@@ -13,6 +14,15 @@
| ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
'';
# "envs.sh host" = pkgs.writers.writeDash "envs-host" ''
# ${pkgs.curl}/bin/curl -F "file=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
# '';
"envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"ix.io" = pkgs.writers.writeDash "ix.io" ''
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
'';
@@ -26,15 +36,11 @@
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
'';
"ipa" = pkgs.writers.writeDash "ipa" ''
${pkgs.scripts.ipa}/bin/ipa
${scripts.ipa}/bin/ipa
'';
"betacode" = pkgs.writers.writeDash "betacode" ''
${pkgs.scripts.betacode}/bin/betacode
${scripts.betacode}/bin/betacode
'';
"devanagari" = pkgs.writers.writeDash "devanagari" ''
${pkgs.scripts.devanagari}/bin/devanagari
'';
"avesta" = pkgs.writeScript "avesta" (builtins.readFile <niveum/packages/scripts/avesta.sed>);
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
@@ -55,7 +61,6 @@ in {
displayManager.defaultSession = "none+i3";
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
};
};
@@ -95,6 +100,10 @@ in {
criteria = {class = "fzfmenu";};
command = "floating enable";
}
{
criteria = {class = ".*";};
command = "border pixel 2";
}
{
criteria = {class = "mpv";};
command = lib.strings.concatStringsSep ", " [
@@ -107,7 +116,6 @@ in {
}
];
};
gaps.inner = 4;
floating = {
titlebar = false;
border = 1;
@@ -121,9 +129,9 @@ in {
focused =
scheme
// {
border = colours.cyan.bright;
indicator = colours.cyan.bright;
childBorder = colours.cyan.bright;
border = colours.blue.bright;
indicator = colours.blue.bright;
childBorder = colours.blue.bright;
};
unfocused =
scheme
@@ -155,7 +163,7 @@ in {
names = ["Monospace" "Font Awesome 6 Free"];
size = 8.0;
};
mode = "hide"; # "dock"
mode = "dock"; # "hide";
position = "bottom";
colors = rec {
background = colours.background;
@@ -196,10 +204,10 @@ in {
"${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}";
"${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
"${modifier}+b" = "workspace prev";
"${modifier}+n" = "workspace next";
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
"${modifier}+x" = "exec ${new-workspace}";
"${modifier}+Shift+c" = "reload";
"${modifier}+Shift+q" = "kill";
@@ -227,10 +235,10 @@ in {
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
"${modifier}+0" = "exec ${pkgs.scripts.menu-calc}/bin/=";
"${modifier}+0" = "exec ${scripts.menu-calc}/bin/=";
"${modifier}+Shift+w" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec ${pkgs.rofi}/bin/rofi -modi run,window,ssh,filebrowser -show run''}";
"${modifier}+Shift+w" = "exec ${scripts.k-lock}/bin/k-lock";
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
"${modifier}+Shift+d" = "exec ${
pkgs.writers.writeDash "notemenu" ''
set -efu
@@ -242,7 +250,7 @@ in {
note_file=$({
echo diary/$(date -I).md
echo diary/$(date -I -d yesterday).md
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2
find . ! -name '.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
} | rofi -dmenu -i -p 'notes')
if test "$note_file"
then
@@ -250,29 +258,30 @@ in {
fi
''
}";
"${modifier}+p" = "exec --no-startup-id ${pkgs.rofi-pass}/bin/rofi-pass";
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
"${modifier}+p" = "exec rofi-pass";
"${modifier}+Shift+p" = "exec rofi-pass --insert";
"${modifier}+u" = "exec ${scripts.unicodmenu}/bin/unicodmenu";
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
"${modifier}+F7" = "exec ${scripts.showkeys-toggle}/bin/showkeys-toggle";
"${modifier}+F8" = "exec switch-theme toggle";
"${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";
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioRaiseVolume" = "exec ${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";
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl pause";
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
"XF86ScreenSaver" = "exec ${scripts.k-lock}/bin/k-lock";
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
"XF86Display" = "exec ${scripts.dmenurandr}/bin/dmenurandr";
# key names detected with xorg.xev:
# XF86WakeUp (fn twice)

View File

@@ -10,6 +10,10 @@
gr = "polytonic";
ru = "phonetic";
ara = "buckwalter";
cop = "";
ave = "";
"in" = "san-kagapa";
il = "phonetic";
};
defaultLanguage = "de";
in {
@@ -19,9 +23,30 @@ in {
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
# buckwalter: http://www.qamus.org/transliteration.htm
xkbVariant = "T3";
xkbOptions =
commaSep xkbOptions;
xkbOptions = commaSep xkbOptions;
libinput.enable = true;
xkbDir = pkgs.symlinkJoin {
name = "x-keyboard-directory";
paths = [
"${pkgs.xkeyboard_config}/etc/X11/xkb"
(pkgs.linkFarm "custom-x-keyboards" [
{
name = "symbols/cop";
path = pkgs.fetchurl {
url = "http://www.moheb.de/download/cop";
sha256 = "1l0h6aq536hyinrh0i0ia355y229bjrlibii0sya5bmqh46vycia";
};
}
{
name = "symbols/ave";
path = pkgs.fetchurl {
url = "https://blog.simos.info/wp-content/uploads/2010/06/avestan.txt";
sha256 = "192zmmm3gxyhim39dsax7r87gsay2w5v2xkhwmvsfipjb60hwp5g";
};
}
])
];
};
};
console.keyMap = "de";

View File

@@ -16,7 +16,22 @@
password = lib.fileContents <secrets/nextcloud-fysi/password>;
};
in {
environment.systemPackages = [pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman];
environment.systemPackages = [
pkgs.khal
pkgs.vdirsyncer
pkgs.khard
pkgs.todoman
(pkgs.writers.writeDashBin "todo-procrastinate" ''
[ $# -eq 1 ] || {
echo "Usage: $0 TODO_ID" >&2
exit 1
}
todo_id=$1
new_timestamp=$(${pkgs.todoman}/bin/todo --porcelain show "$todo_id" | ${pkgs.jq}/bin/jq '.due + 24 * 60 * 60')
new_date=$(${pkgs.coreutils}/bin/date +"%Y-%m-%d %H:%M" -d "@$new_timestamp")
${pkgs.todoman}/bin/todo edit "$todo_id" --due "$new_date"
'')
];
systemd.user.services.vdirsyncer = {
enable = true;

View File

@@ -14,6 +14,7 @@
nginx.enable = false;
node = {
enable = true;
openFirewall = true;
enabledCollectors = [
"conntrack"
"diskstats"
@@ -38,8 +39,6 @@
};
};
networking.firewall.allowedTCPPorts = [config.services.prometheus.exporters.node.port];
systemd.services.promtail = {
description = "Promtail service for Loki";
wantedBy = ["multi-user.target"];

View File

@@ -4,7 +4,8 @@
config,
...
}: let
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
in {
environment.shellAliases.smpv = swallow "mpv";

View File

@@ -6,11 +6,8 @@
mainMailbox = "posteo";
accounts = import <niveum/lib/email.nix> {inherit lib mainMailbox;};
in {
environment.systemPackages = [pkgs.neomutt];
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}";
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = let
neomuttConfig = emailAccounts: let
as-pdf = pkgs.writers.writeDash "as-pdf" ''
d=$(mktemp -d)
trap clean EXIT
@@ -26,7 +23,7 @@ in {
text/plain; $EDITOR %s ;
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
image/*; ${pkgs.nsxiv}/bin/nsxiv %s ;
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
video/*; ${pkgs.util-linux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
audio/*; ${pkgs.mpv}/bin/mpv %s ;
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
@@ -101,7 +98,7 @@ in {
folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"'
named-mailboxes "${name}" "${imapRoot}" "${name}" "${imapRoot}/${account.folders.sent}"
'')
accounts)
emailAccounts)
}
''
}
@@ -161,4 +158,15 @@ in {
''
}
'';
in {
environment.systemPackages = [pkgs.neomutt];
environment.shellAliases =
lib.mapAttrs' (accountName: account:
lib.nameValuePair
"mua-${accountName}"
"${pkgs.neomutt}/bin/neomutt -F ${pkgs.writeText "neomuttrc-${accountName}" (neomuttConfig {"${accountName}" = accounts.${accountName};})}")
accounts
// {mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}";};
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = neomuttConfig accounts;
}

View File

@@ -44,12 +44,14 @@
vim-repeat
vim-sensible
vim-surround
(pkgs.vimUtils.buildVimPlugin {
name = "vim-dim-1.1.0";
(pkgs.vimUtils.buildVimPlugin rec {
pname = "vim-dim";
version = "1.1.0";
name = "${pname}-${version}";
src = pkgs.fetchFromGitHub {
owner = "jeffkreeftmeijer";
repo = "vim-dim";
rev = "1.1.0";
repo = pname;
rev = version;
sha256 = "sha256-lyTZUgqUEEJRrzGo1FD8/t8KBioPrtB3MmGvPeEVI/g=";
};
})

View File

@@ -1,17 +1,42 @@
{
pkgs,
config,
lib,
...
}: let
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
linkhandler = pkgs.writers.writeDash "linkhandler" ''
# Feed script a url or file location.
# If an image, it will view in sxiv,
# if a video or gif, it will view in mpv
# if a music file or pdf, it will download,
# otherwise it opens link in browser.
# If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
setsid -f ${pkgs.mpv}/bin/mpv -quiet "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;;
*)
if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1"
else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;;
esac
'';
newsboat-config = pkgs.writeText "config" ''
auto-reload no
reload-threads 8
prepopulate-query-feeds yes
# dont keep a search history
@@ -21,12 +46,12 @@
text-width 85
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
browser ${linkhandler-bin}
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler} {}'"
browser ${linkhandler}
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 "${youtube-download}" ; open-in-browser ; set browser ${linkhandler-bin}
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler}
macro v set browser "${pkgs.util-linux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler}
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler}
bind-key j down
bind-key k up
@@ -61,13 +86,24 @@
color listfocus blue default
color listfocus_unread blue default bold
color info red default bold
urls-source "ttrss"
ttrss-url "https://feed.kmein.de"
ttrss-login "k"
ttrss-flag-star "s"
ttrss-password "${lib.strings.fileContents <secrets/tt-rss/password>}"
ttrss-mode "multi"
'';
newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db";
in {
nixpkgs.config.packageOverrides = pkgs: {
newsboat = pkgs.writers.writeDashBin "newsboat" ''
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -u ${pkgs.writeText "newsboat-urls" ''
https://feed.kmein.de/public.php?op=rss&id=-1&is_cat=0&q=&key=${lib.strings.fileContents <secrets/tt-rss/private-rss.key>} "foo"
"query:🕒 Read Later:flags # \"e\""
"query:📥 Unread:unread = \"yes\""
''} "$@"
'';
};

View File

@@ -3,11 +3,13 @@
lib,
...
}: let
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {utillinux = pkgs.util-linux;};
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
menstruation = pkgs.callPackage <menstruation-backend> {};
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
zoteroStyle = {
name,
sha256,
@@ -94,16 +96,16 @@ in {
file # determine file type
dos2unix
genpass # generate passwords
ncdu # ncurses disk usage
gdu # ncurses disk usage (ncdu is broken)
rmlint # remove duplicate files
python3Packages.jsonschema # json validation
jq # json toolkit
pup # html toolkit
htmlq
xsv # csv toolkit
xmlstarlet # xml toolkit
fq # toolkit for yaml, xml and binaries
man-pages
posix_man_pages
man-pages-posix
tree
exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
@@ -182,6 +184,7 @@ in {
scripts.trans
scripts.mpv-radio
# kmein.slide
termdown
scripts.tolino-screensaver
scripts.rfc
scripts.tag

View File

@@ -8,6 +8,19 @@ in {
home-manager.users.me.programs.rofi = {
enable = true;
font = "Monospace 10";
theme = "${pkgs.rofi}/share/rofi/themes/Arc-Dark.rasi";
theme = "${pkgs.rofi}/share/rofi/themes/Arc.rasi";
pass = {
enable = true;
extraConfig = ''
_pwgen() {
${pkgs.genpass}/bin/genpass "$@"
}
USERNAME_field='login'
default_user2=kmein
help_color="#FF0000"
''; # help_color set by https://github.com/mrossinek/dotfiles/commit/13fc5f24caa78c8f20547bf473266879507f13bf
};
plugins = [pkgs.rofi-calc];
};
}

View File

@@ -7,4 +7,5 @@
fonts.fontconfig.enable = false;
nix.gc.automatic = true;
nix.optimise.automatic = true;
services.journald.extraConfig = "SystemMaxUse=500M";
}

View File

@@ -7,8 +7,16 @@
inherit (import <niveum/lib>) sshPort kieran;
externalNetwork = import <niveum/lib/external-network.nix>;
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
ssh-passphrase = lib.strings.fileContents <system-secrets/ssh/passphrase>;
in {
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
services.xserver.displayManager.sessionCommands = toString (pkgs.writeScript "ssh-add" ''
#!${pkgs.expect}/bin/expect -f
spawn ${pkgs.openssh}/bin/ssh-add
expect "Enter passphrase for *:"
send "${ssh-passphrase}\n";
expect "Identity added: *"
interact
'');
programs.ssh.startAgent = true;
@@ -16,7 +24,7 @@ in {
home-manager.users.me.programs.ssh = {
enable = true;
matchBlocks = {
matchBlocks = rec {
"github.com" = {
hostname = "ssh.github.com";
port = 443;
@@ -41,6 +49,11 @@ in {
user = "root";
port = sshPort;
};
tabula = {
hostname = "tabula.r";
user = "root";
port = sshPort;
};
manakish = {
hostname = "manakish.r";
user = "kfm";
@@ -64,6 +77,7 @@ in {
user = "root";
identityFile = sshIdentity "fysiweb";
};
${fysi-dev1.hostname} = fysi-dev1;
"fysi-shared0" = {
hostname = "49.12.205.235";
user = "root";

View File

@@ -44,7 +44,7 @@
'';
in {
niveum.telegramBots.transits = {
enable = false;
enable = true;
time = "*:0/1";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["-1001796440545"];
@@ -52,7 +52,7 @@ in {
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
{
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node" -A 2
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
'');

View File

@@ -0,0 +1,35 @@
{
pkgs,
lib,
...
}: let
celan = pkgs.fetchzip {
url = "http://c.krebsco.de/celan.tar.gz";
sha256 = "sha256-nA+EwAH2vkeolsy9AoPLEMt1uGKDZe/aPrS95CZvuus=";
};
in {
niveum.telegramBots.celan = {
enable = true;
time = "08:00";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["@PaulCelan"];
command = toString (pkgs.writers.writeDash "random-celan" ''
cd ${celan}
poem="$(${pkgs.findutils}/bin/find . -type f | ${pkgs.coreutils}/bin/shuf -n1)"
source="$(${pkgs.coreutils}/bin/dirname "$poem" | ${pkgs.gnused}/bin/sed 's#^\./##;s/[-_]/ /g;s!/! !g;s/0\([0-9]\+\)/\1/g')"
cat "$poem"
echo
printf "Aus: %s\n" "$source"
'');
};
systemd.timers.telegram-bot-celan.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{
title = "Paul Celan Bot";
description = "sends a random poem by Paul Celan to Telegram.";
link = "https://t.me/PaulCelan";
}
];
}

View File

@@ -22,6 +22,7 @@ in {
./smyth.nix
./nachtischsatan.nix
./tlg-wotd.nix
./celan.nix
<niveum/modules/telegram-bot.nix>
];

View File

@@ -5,7 +5,7 @@
}: {
niveum.telegramBots.smyth = {
enable = true;
time = "06/6:00";
time = "08:00";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["@HerbertWeirSmyth"];
command = toString (pkgs.writers.writeDash "random-smyth" ''
@@ -25,7 +25,7 @@
'');
};
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "3h";
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "10h";
niveum.passport.services = [
{

View File

@@ -12,7 +12,7 @@
${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)"
"*\(.word)* '\'''\(.definition | sub("<.*>"; "") | rtrimstr(" "))'\'''\n\nFirst occurrence: \(.firstOccurrence)\nNumber of occurrences: \(.totalOccurrences)"
'
'');
parseMode = "Markdown";

View File

@@ -7,6 +7,15 @@
# nothing to see here
'';
environment.systemPackages = [pkgs.atuin];
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
auto_sync = true
update_check = false
sync_address = "http://zaatar.r:8888"
sync_frequency = 0
style = "compact"
'');
programs.zsh = let
zsh-completions = pkgs.fetchFromGitHub {
owner = "zsh-users";
@@ -14,12 +23,6 @@
rev = "cf565254e26bb7ce03f51889e9a29953b955b1fb";
sha256 = "1yf4rz99acdsiy0y1v3bm65xvs2m0sl92ysz0rnnrlbd5amn283l";
};
zsh-history-substring-search = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-history-substring-search";
rev = "aae3388491c2312c4efb2e86bcb999927bb2900e";
sha256 = "0lgmq1xcccnz5cf7vl0r0qj351hwclx9p80cl0qczxry4r2g5qaz";
};
in {
enable = true;
enableCompletion = true;
@@ -54,12 +57,6 @@
autoload -U zmv run-help
fpath=(${zsh-completions}/src $fpath)
source ${zsh-history-substring-search}/zsh-history-substring-search.zsh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
'';
promptInit = with config.niveum; ''
autoload -Uz vcs_info
@@ -71,6 +68,13 @@
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
# atuin distributed shell history
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
# use zsh only session history
fc -p
precmd () {
vcs_info
RPROMPT="$vcs_info_msg_0_"

84
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
@@ -23,11 +23,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1661573386,
"narHash": "sha256-pBEg8iY00Af/SAtU2dlmOAv+2x7kScaGlFRDjNoVJO8=",
"lastModified": 1669825171,
"narHash": "sha256-HxlZHSiRGXnWAFbIJMeujqBe2KgACYx5XDRY0EA9P+4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d89bdff445eadff03fe414e9c30486bc8166b72b",
"rev": "478610aa37c8339eacabfa03f07dacf5574edd47",
"type": "github"
},
"original": {
@@ -63,11 +63,11 @@
"menstruation-backend": {
"flake": false,
"locked": {
"lastModified": 1649545504,
"narHash": "sha256-TVm3246ML7gWPeGm+bdb+Qo8o/7nve7sQ2hBdCZm3z8=",
"lastModified": 1667816906,
"narHash": "sha256-VdckYVSQZfqThPb06Y5TGSI+kkibgM/G9pH5SQHIybI=",
"owner": "kmein",
"repo": "menstruation.rs",
"rev": "d9f3c6d53542fd7c7ed191e37cf4e342d4a47bcb",
"rev": "95c495d453c35f20a6a5641a88a862c668404acf",
"type": "github"
},
"original": {
@@ -79,11 +79,11 @@
"menstruation-telegram": {
"flake": false,
"locked": {
"lastModified": 1634815642,
"narHash": "sha256-q1OTMx5ayNu9ppHJBDUie/ow+BcA5DXnHEm11EY+C4E=",
"lastModified": 1667816918,
"narHash": "sha256-yQSl0iKqHm7qFLELY8e7OzRRdnqSBbzJmQIYgkXlJpQ=",
"owner": "kmein",
"repo": "menstruation-telegram",
"rev": "a34555cf46f02157718b0565b5456348fff54181",
"rev": "828872cf9c425442705a95019eceee397bc1c03f",
"type": "github"
},
"original": {
@@ -95,11 +95,11 @@
"nix-writers": {
"flake": false,
"locked": {
"lastModified": 1554228333,
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
"lastModified": 1669756621,
"narHash": "sha256-Scg3pf+igUXt/YTO8kxQLBmBqCgGPVt/16DFC8YuA2g=",
"ref": "refs/heads/master",
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
"revCount": 32,
"rev": "f65c77bdcc58be2081a0ffbda849289c5191b5e8",
"revCount": 33,
"type": "git",
"url": "https://cgit.krebsco.de/nix-writers"
},
@@ -110,27 +110,27 @@
},
"nixos-stable": {
"locked": {
"lastModified": 1661520432,
"narHash": "sha256-9z+WDeXiu3hobvSsL0SbHDx4s+kFmm8eussySuX4zCM=",
"lastModified": 1669834992,
"narHash": "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f11e12ac6af528c1ba12426ce83cee26f21ceafd",
"rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixos-unstable": {
"locked": {
"lastModified": 1660305968,
"narHash": "sha256-r0X1pZCSEA6mzt5OuTA7nHuLmvnbkwgpFAh1iLIx4GU=",
"lastModified": 1669542132,
"narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d",
"rev": "a115bb9bd56831941be3776c8a94005867f316a7",
"type": "github"
},
"original": {
@@ -143,11 +143,11 @@
"recht": {
"flake": false,
"locked": {
"lastModified": 1619583518,
"narHash": "sha256-3eFw6xWue9cvPxXq1ROq32ecvPOmqOedgQhyOr7N9iE=",
"lastModified": 1669719044,
"narHash": "sha256-WsLWlTM2Hrurj9kVajybIOavV9QPYiJweMCOQR6h+YI=",
"owner": "kmein",
"repo": "recht",
"rev": "d551afed23122bb3106e59eb2274394ec5555048",
"rev": "7c15b13328fb5cee01012c488ff235ee730cac70",
"type": "github"
},
"original": {
@@ -159,11 +159,11 @@
"retiolum": {
"flake": false,
"locked": {
"lastModified": 1660680907,
"narHash": "sha256-D6XkykgU1BiDAnnFG9NwSqBRKCZAHK+2+Ri2/m9rzo8=",
"lastModified": 1669921153,
"narHash": "sha256-il4bbuxSU/hXj3dkUcex97vHDuSgBeBaRfoxKS8EeOA=",
"owner": "krebs",
"repo": "retiolum",
"rev": "c4d6b07be29b3b9267027ed25792a2cb350459d5",
"rev": "4679cdd5f0851f22518e7011144f22431e6551c0",
"type": "github"
},
"original": {
@@ -195,11 +195,11 @@
"scripts": {
"flake": false,
"locked": {
"lastModified": 1660677220,
"narHash": "sha256-cCmyI4CigWbeQ0wEiE9HSI2Hmd3Wi5P7jhdHX6bJkXU=",
"lastModified": 1669193831,
"narHash": "sha256-R8RNb7mM0bDF3UTfQqpumYPBwal7QzWSKgxMUY2dRm8=",
"owner": "kmein",
"repo": "scripts",
"rev": "688e141047e831a7e5f58dd24e00de51a3cb2345",
"rev": "84ad80348294e9423996b52a4b112700ae5d3176",
"type": "github"
},
"original": {
@@ -211,11 +211,11 @@
"stockholm": {
"flake": false,
"locked": {
"lastModified": 1661246925,
"narHash": "sha256-hGNCF4m3SuVogqoipmJzNIKoh03S/SMnO5oMHgfHWjA=",
"lastModified": 1669756706,
"narHash": "sha256-M4Aj6NoYvS6u/52U+cM4yWdpnbdJQ4k1d4u0yrCUY8Y=",
"ref": "refs/heads/master",
"rev": "d1fa957ed5bf60767c83c96135f9142f6c96ea50",
"revCount": 10749,
"rev": "81b5682c5ff1e36613f844a874e09b897ee13d3e",
"revCount": 10973,
"type": "git",
"url": "https://cgit.lassul.us/stockholm"
},
@@ -243,11 +243,11 @@
"tinc-graph": {
"flake": false,
"locked": {
"lastModified": 1653080212,
"narHash": "sha256-BcfppAuVNp0hMcrMG/ZxE4juSrdQbJSUIA0eHS1/Wxo=",
"lastModified": 1666162569,
"narHash": "sha256-7ebWs/ryDebUMONkn6dPckNnUGrEuPQScoY+O/+vo+Q=",
"owner": "kmein",
"repo": "tinc-graph",
"rev": "ea0ef2e5542684d1d8e34a626cb9295dec33e70d",
"rev": "72a4b305fcb49cfd6d456103cda45888a6b34bbe",
"type": "github"
},
"original": {
@@ -290,11 +290,11 @@
},
"utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {

View File

@@ -2,7 +2,7 @@
description = "niveum: packages, modules, systems";
inputs = {
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05";
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.11";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
@@ -172,9 +172,10 @@
sources =
["nix-writers" "nixpkgs" "retiolum" "stockholm"]
++ {
zaatar = ["traadfri"];
zaatar = ["traadfri" "nixos-unstable"];
ful = [];
tahina = [];
tabula = [];
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];

View File

@@ -1,37 +1,37 @@
rec {
black = {
bright = "#4b4b4b";
dark = "#242424";
bright = "#282c34";
dark = "#282c34";
};
red = {
bright = "#fc1c18";
dark = "#d71c15";
bright = "#e06c75";
dark = "#e06c75";
};
green = {
bright = "#6bc219";
dark = "#5aa513";
bright = "#98c379";
dark = "#98c379";
};
yellow = {
bright = "#fec80e";
dark = "#fdb40c";
bright = "#e5c07b";
dark = "#e5c07b";
};
blue = {
bright = "#0955ff";
dark = "#063b8c";
bright = "#61afef";
dark = "#61afef";
};
magenta = {
bright = "#fb0050";
dark = "#e40038";
bright = "#c678dd";
dark = "#c678dd";
};
cyan = {
bright = "#3ea8fc";
dark = "#2595e1";
bright = "#56b6c2";
dark = "#56b6c2";
};
white = {
bright = "#8c00ec";
dark = "#efefef";
bright = "#dcdfe4";
dark = "#dcdfe4";
};
background = "#181818";
foreground = white.dark;
cursor = "#bbbbbb";
background = black.dark;
foreground = white.bright;
cursor = "#a3b3cc";
}

View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#4b4b4b";
dark = "#242424";
};
red = {
bright = "#fc1c18";
dark = "#d71c15";
};
green = {
bright = "#6bc219";
dark = "#5aa513";
};
yellow = {
bright = "#fec80e";
dark = "#fdb40c";
};
blue = {
bright = "#0955ff";
dark = "#063b8c";
};
magenta = {
bright = "#fb0050";
dark = "#e40038";
};
cyan = {
bright = "#3ea8fc";
dark = "#2595e1";
};
white = {
bright = "#8c00ec";
dark = "#efefef";
};
background = white.dark;
foreground = "#181818";
cursor = "#bbbbbb";
}

View File

@@ -1,37 +0,0 @@
rec {
black = {
bright = "#282c34";
dark = "#282c34";
};
red = {
bright = "#e06c75";
dark = "#e06c75";
};
green = {
bright = "#98c379";
dark = "#98c379";
};
yellow = {
bright = "#e5c07b";
dark = "#e5c07b";
};
blue = {
bright = "#61afef";
dark = "#61afef";
};
magenta = {
bright = "#c678dd";
dark = "#c678dd";
};
cyan = {
bright = "#56b6c2";
dark = "#56b6c2";
};
white = {
bright = "#dcdfe4";
dark = "#dcdfe4";
};
background = black.dark;
foreground = white.bright;
cursor = "#a3b3cc";
}

View File

@@ -45,11 +45,11 @@ rec {
theme = pkgs: {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome3.gnome-themes-extra;
package = pkgs.gnome.gnome-themes-extra;
};
icon = {
name = "Adwaita";
package = pkgs.gnome3.adwaita-icon-theme;
package = pkgs.gnome.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";

View File

@@ -8,7 +8,7 @@
setsid = script:
pkgs.writers.writeDash "setsid-command" ''
${pkgs.utillinux}/bin/setsid ${script}
${pkgs.util-linux}/bin/setsid ${script}
'';
accounts = import <niveum/lib/email.nix> {inherit lib;};
@@ -75,7 +75,7 @@ in {
{
block = "github";
info = ["total"];
warning = ["mention" "review_requested"];
warning = ["mention" "review_requested" "team_mention" "manual" "invitation" "assign" "subscribed"];
}
{
block = "custom";

View File

@@ -23,7 +23,10 @@
ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
};
tabula = {
ipv4 = "10.243.2.78";
ipv6 = "";
};
tahina = {
ipv4 = "10.243.2.74";
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";

View File

@@ -6,7 +6,7 @@ let
ambient = "🧘 Ambient";
american = "🇺🇸 USA";
amro = "👦 Amro";
arabic = "🇸🇦 عربيic";
arabic = "🇱🇧 عربي";
balkan = "🇧🇦 Balkan";
berlin = "🐻 Berlin";
brazilian = "🇧🇷 Brasil";
@@ -14,6 +14,7 @@ let
chinese = "🇨🇳 ";
classical = "🎻 Classical";
discover = "😲 Discover";
danish = "🇩🇰 Dansk";
dnb = "🥁 DnB";
dubstep = "🎆 Dubstep";
french = "🇫🇷 France";
@@ -30,6 +31,7 @@ let
metal = "🤘 Metal";
party = "🪩 Party";
pop = "🎙 Pop";
radiorecord = " Record";
rap = "💸 Rap";
rock = "🎸 Rock";
russian = "🇷🇺 Россия";
@@ -70,6 +72,9 @@ let
royal-name = name: "${name} | RoyalRadio";
royal = name: "http://193.33.170.218:8000/${name}";
dr-name = name: "${name} | Danmarks Radio";
dr = name: let quality = 320; in "https://drliveradio.akamaized.net/hls/live/2022411-b/${name}/playlist-${toString quality}000.m3u8";
bhaktiworld-name = name: "${name} | Bhaktiworld";
bhaktiworld = name: "http://${name}.out.airtime.pro:8000/${name}_a";
bhaktiworld-logo = "http://www.bhaktiworld.com/Bhakti-world-logo.png";
@@ -152,7 +157,7 @@ in
}
{
stream = "http://rb-stream.de:8000/rrb_128.mp3";
station = "Radio Russkij Berlin";
station = "Radio Golos Berlina";
logo = "http://radio-rb.de/img/site/logo.png";
desc = "Голос нашего города ...";
tags = [tags.berlin tags.russian];
@@ -164,7 +169,7 @@ in
]
++
# generated via: curl https://radiorecord.ru/api/stations | jq '.result.stations | sort_by(.sort) | map({station:.title,desc:.tooltip,logo:.icon_fill_colored,stream:.stream_320})' > radiorecord.json
importJSON ./radiorecord.json
map (x: x // {tags = [tags.radiorecord];}) (importJSON ./radiorecord.json)
++ [
{
desc = "Your favorite dance tunes from the start of the decade. Familiar hits and overlooked classics in abundance.";
@@ -1781,6 +1786,41 @@ in
stream = "http://radio.hostchefs.net:8046/stream";
tags = [tags.greek];
}
{
station = dr-name "P4 København";
stream = dr "p4kobenhavn";
tags = [tags.top40 tags.danish];
}
{
station = dr-name "P1";
stream = dr "p1";
tags = [tags.top40 tags.danish];
}
{
station = dr-name "P2";
stream = dr "p2";
tags = [tags.classical tags.danish];
}
{
station = dr-name "P3";
stream = dr "p3";
tags = [tags.top40 tags.danish];
}
{
station = dr-name "P5 København";
stream = dr "p5kobenhavn";
tags = [tags.top40 tags.danish];
}
{
station = dr-name "P6 Beat";
stream = dr "p6beat";
tags = [tags.top40 tags.danish];
}
{
station = dr-name "P8 Jazz";
stream = dr "p8jazz";
tags = [tags.jazz tags.danish];
}
]
/*
(caster-fm "TODO" "noasrv" 10182) # https://github.com/cccruzr/albumsyoumusthear/blob/7e00baf575e4d357cd275d54d1aeb717321141a8/HLS/IBERO_90_1.m3u

7
packages/jsesh.nix Normal file
View File

@@ -0,0 +1,7 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.writers.writeDashBin "jsesh" ''
${pkgs.jre}/bin/java -jar ${pkgs.fetchzip {
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
}}/lib/jseshAppli-7.5.5.jar
''

View File

@@ -2,7 +2,7 @@
lib,
stdenv,
cmake,
pkgconfig,
pkg-config,
libogg,
fetchFromGitHub,
}:
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
buildInputs = [libogg];
nativeBuildInputs = [cmake pkgconfig];
nativeBuildInputs = [cmake pkg-config];
meta = with lib; {
homepage = "https://github.com/fmang/opustags";

View File

@@ -1,12 +0,0 @@
diff --git a/rofi-pass b/rofi-pass
index 48928db..13682a5 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -15,7 +15,7 @@ _image_viewer () {
# We expect to find these fields in pass(1)'s output
URL_field='url'
-USERNAME_field='user'
+USERNAME_field='login'
AUTOTYPE_field='autotype'
OTPmethod_field='otp_method'

View File

@@ -278,12 +278,6 @@ in
name = "nix-git";
};
linkhandler = wrapScript {
packages = [pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts];
script = "${voidrice}/.local/bin/linkhandler";
name = "linkhandler";
};
mansplain = wrapScript {
packages = [pkgs.man pkgs.zathura pkgs.dmenu pkgs.gnused];
script = ./mansplain.sh;
@@ -314,7 +308,7 @@ in
};
default-gateway = pkgs.writers.writeDashBin "default-gateway" ''
${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
${pkgs.iproute2}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
'';
betacode =

View File

@@ -20,7 +20,7 @@
with open("${
fetchurl {
url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt";
sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs=";
sha256 = "0wva6ygnh3wrzpzy0kcbc32hz1ydx3k2pqc5xkqrfw83cpnrlvl0";
}
}", "r") as unicode_data:
reader = csv.reader(unicode_data, delimiter=";")

View File

@@ -2,7 +2,8 @@
vimUtils,
fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix {
name = "cheat.sh-vim";
pname = "cheat.sh-vim";
version = "826219d1";
src = fetchFromGitHub {
owner = "dbeniamine";
repo = "cheat.sh-vim";

View File

@@ -2,7 +2,8 @@
vimUtils,
fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix {
name = "icalendar.vim";
pname = "icalendar.vim";
version = "542fff45";
src = fetchFromGitHub {
owner = "vim-scripts";
repo = "icalendar.vim";

View File

@@ -3,7 +3,8 @@
fetchFromGitHub,
}:
vimUtils.buildVimPluginFrom2Nix {
name = "jq.vim";
pname = "jq.vim";
version = "5baf8ed1";
src = fetchFromGitHub {
owner = "vito-c";
repo = "jq.vim";

View File

@@ -3,7 +3,8 @@
fetchFromGitHub,
}:
vimUtils.buildVimPluginFrom2Nix {
name = "vim-256noir";
pname = "vim-256noir";
version = "e8668a18";
src = fetchFromGitHub {
owner = "andreasvc";
repo = "vim-256noir";

View File

@@ -3,7 +3,8 @@
fetchFromGitHub,
}:
vimUtils.buildVimPluginFrom2Nix rec {
name = "vim-colors-paramount";
pname = "vim-colors-paramount";
version = "a5601d36";
src = fetchFromGitHub {
owner = "owickstrom";
repo = "vim-colors-paramount";

View File

@@ -2,7 +2,8 @@
vimUtils,
fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix rec {
name = "vim-fetch";
pname = "vim-fetch";
version = "76c08586";
src = fetchFromGitHub {
owner = "wsdjeg";
repo = "vim-fetch";

View File

@@ -3,7 +3,8 @@
fetchFromGitHub,
}:
vimUtils.buildVimPluginFrom2Nix {
name = "vim-fsharp";
pname = "vim-fsharp";
version = "627db7d7";
src = fetchFromGitHub {
owner = "fsharp";
repo = "vim-fsharp";

View File

@@ -3,7 +3,8 @@
fetchFromGitHub,
}:
vimUtils.buildVimPluginFrom2Nix {
name = "vim-mail";
pname = "vim-mail";
version = "acdbb5bd";
src = fetchFromGitHub {
owner = "dbeniamine";
repo = "vim-mail";

View File

@@ -2,7 +2,8 @@
vimUtils,
fetchFromGitHub,
}: (vimUtils.buildVimPluginFrom2Nix {
name = "vim-reason-plus";
pname = "vim-reason-plus";
version = "c11a2940";
src = fetchFromGitHub {
owner = "reasonml-editor";
repo = "vim-reason-plus";

View File

@@ -8,7 +8,7 @@
in {
imports = [
./hardware-configuration.nix
# <niveum/configs/monitoring.nix>
<niveum/configs/monitoring.nix>
<niveum/configs/nix.nix>
<niveum/configs/save-space.nix>
<niveum/configs/spacetime.nix>
@@ -45,4 +45,7 @@ in {
users.users.root.passwordFile = toString <system-secrets/root.password>;
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
# since 22.05 timeout fails?
systemd.services.systemd-networkd-wait-online.enable = false;
}

View File

@@ -24,7 +24,7 @@ in {
max-jobs = 2;
};
environment.systemPackages = [pkgs.minecraft];
environment.systemPackages = [pkgs.minecraft pkgs.zeroad];
networking = {
hostName = "kabsa";

View File

@@ -34,8 +34,8 @@
fsType = "vfat";
};
"/mnt/sd-card" = {
device = "/dev/disk/by-id/mmc-SD32G_0xda0aa352-part1";
fsType = "vfat";
device = "/dev/disk/by-id/mmc-5E4S5_0xc5155d05-part1";
fsType = "ext4";
options = ["nofail"];
};
};

View File

@@ -10,10 +10,8 @@ in {
./gitea.nix
./hardware-configuration.nix
./hedgedoc.nix
./matterbridge.nix
./menstruation.nix
./moinbot.nix
# ./horoscopy.nix
./monitoring
./moodle-dl-borsfaye.nix
./names.nix
@@ -22,6 +20,7 @@ in {
./radio.nix
./retiolum-map.nix
./tarot.nix
./tt-rss.nix
./urlwatch.nix
./weechat.nix
<niveum/configs/monitoring.nix>

View File

@@ -4,10 +4,12 @@ let
in {
services.gitea = {
enable = true;
disableRegistration = true;
rootUrl = domain;
appName = "code.kmein.de";
ssh.clonePort = sshPort;
settings = {
server.SSH_PORT = sshPort;
service.DISABLE_REGISTRATION = true;
};
};
services.nginx.virtualHosts."code.kmein.de" = {
forceSSL = true;

View File

@@ -27,7 +27,7 @@ in {
services.hedgedoc = {
enable = true;
configuration = {
settings = {
allowOrigin = [domain];
allowAnonymous = true;
allowGravatar = false;

View File

@@ -4,7 +4,13 @@
...
}: let
backend = pkgs.callPackage <menstruation-backend> {};
telegram = pkgs.callPackage <menstruation-telegram> {};
old-pkgs = import (pkgs.fetchFromGitHub {
owner = "NixOs";
repo = "nixpkgs";
rev = "695b3515251873e0a7e2021add4bba643c56cde3";
hash = "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI=";
}) {};
telegram = old-pkgs.poetry2nix.mkPoetryApplication {projectDir = <menstruation-telegram>;};
backendPort = 8000;
in {
services.redis.servers.menstruation = {

View File

@@ -2,8 +2,11 @@
systemd.services.moinbot = {
startAt = "7:00";
script = ''
echo moin | ${pkgs.ircaids}/bin/ircsink \
--nick moinbot \
greeting=$(echo "moin
oi
noim" | shuf -n1)
echo "$greeting" | ${pkgs.ircaids}/bin/ircsink \
--nick "$greeting""bot" \
--server irc.hackint.org \
--port 6697 \
--secure \

View File

@@ -10,21 +10,40 @@
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;
settings.server = {
domain = "grafana.kmein.r";
http_port = 9444;
http_addr = "127.0.0.1";
};
};
services.nginx.virtualHosts = {
${config.services.grafana.settings.server.domain} = {
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
};
};
${lib.removePrefix "http://" config.services.prometheus.alertmanager.webExternalUrl} = {
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.prometheus.alertmanager.port}";
proxyWebsockets = true;
};
};
${lib.removePrefix "http://" config.services.prometheus.webExternalUrl} = {
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.prometheus.port}";
proxyWebsockets = true;
};
};
};
services.prometheus.webExternalUrl = "http://prometheus.kmein.r";
niveum.passport.services = [
{
title = "Prometheus";
link = config.services.prometheus.webExternalUrl;
description = "collects metrics from devices in the <i>niveum</i> network, blackbox monitors some websites.";
}
{
@@ -33,11 +52,12 @@ in {
}
{
title = "Grafana";
link = "http://${config.services.grafana.domain}";
link = "http://${config.services.grafana.settings.server.domain}";
description = "displays metrics from devices in the <i>niveum</i> network.";
}
{
title = "Alertmanager bot";
title = "Alertmanager";
link = config.services.prometheus.alertmanager.webExternalUrl;
description = "notifies me when something goes wrong.";
}
];
@@ -143,48 +163,31 @@ in {
})
];
systemd.services.alertmanager-bot-telegram = {
wantedBy = ["multi-user.target"];
after = ["ip-up.target"];
environment.TELEGRAM_ADMIN = "18980945";
environment.TELEGRAM_TOKEN = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
serviceConfig = {
Restart = "on-failure";
RestartSec = "15s";
DynamicUser = true;
StateDirectory = "alertbot";
ExecStart = '' ${pkgs.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 -}}
{{.Status}}: {{ index .Annotations "summary"}}
{{end -}}
{{end}}
''
}'';
};
};
services.prometheus.alertmanager = {
enable = true;
listenAddress = "localhost";
webExternalUrl = "http://alertmanager.kmein.r";
configuration = {
route = {
group_wait = "30s";
repeat_interval = "4h";
receiver = "me";
repeat_interval = "24h";
receiver = "email";
};
receivers = [
{
name = "me";
webhook_configs = [
name = "email";
email_configs = let
inherit (import <niveum/lib>) kieran;
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;
in [
{
url = "http://localhost:16320";
send_resolved = true;
to = kieran.email;
from = cock.user;
smarthost = "${cock.smtp}:587";
auth_username = cock.user;
auth_identity = cock.user;
auth_password = cock.password;
}
];
}
@@ -196,7 +199,7 @@ in {
{
scheme = "http";
path_prefix = "/";
static_configs = [{targets = ["localhost:9093"];}];
static_configs = [{targets = ["localhost:${toString config.services.prometheus.alertmanager.port}"];}];
}
];
@@ -258,6 +261,16 @@ in {
}
];
}
{
job_name = "ful";
static_configs = [
{
targets = [
"ful.r:${toString config.services.prometheus.exporters.node.port}"
];
}
];
}
];
services.prometheus.exporters.blackbox = {

View File

@@ -9,7 +9,7 @@
in {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud24;
package = pkgs.nextcloud25;
https = true;
@@ -20,6 +20,8 @@ in {
hostName = "cloud.xn--kiern-0qa.de";
phpOptions."opcache.interned_strings_buffer" = "32"; # buffer size in MB
config = {
overwriteProtocol = "https";
@@ -31,6 +33,27 @@ in {
adminpassFile = passwordFile <system-secrets/nextcloud/admin>;
adminuser = "admin";
# extraTrustedDomains = [ "toum.r" ];
defaultPhoneRegion = "DE";
};
logLevel = 2;
extraOptions = let
inherit (import <niveum/lib/email.nix> {inherit lib;}) cock;
address = builtins.split "@" cock.user;
in {
defaultapp = "files";
mail_smtpmode = "smtp";
mail_sendmailmode = "smtp";
mail_smtphost = cock.smtp;
mail_smtpport = "587";
mail_from_address = builtins.elemAt address 0;
mail_domain = builtins.elemAt address 2;
mail_smtpsecure = "tls";
mail_smtpauthtype = "LOGIN";
mail_smtpauth = 1;
mail_smtpname = cock.user;
mail_smtppassword = cock.password;
};
};

View File

@@ -0,0 +1,24 @@
{
pkgs,
lib,
...
}: let
domain = "feed.kmein.de";
in {
services.tt-rss = {
enable = true;
logDestination = "syslog";
root = "/var/lib/tt-rss";
selfUrlPath = "https://${domain}";
virtualHost = domain;
registration = {
enable = false;
maxUsers = 3;
};
};
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
};
}

View File

@@ -26,19 +26,6 @@
url = "http://lammla.info/index.php?reihe=30";
filter = ["html2text" "strip"];
}
{
name = "Tatort";
url = "https://www.daserste.de/unterhaltung/krimi/tatort/vorschau/index.html";
filter = [
"html2text"
"strip"
{
shellpipe = ''
${pkgs.gnused}/bin/sed 's/&#32;/ /g;s/))/&\n/g;s/ \+/ /g'
'';
}
];
}
{
name = "Kratylos";
url = "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
@@ -49,11 +36,6 @@
url = "http://www.zeno.org/Lesesaal/M/E-Books";
filter = [{element-by-class = "zenoCOMain";} "html2text" "strip"];
}
{
name = "Arnshaugk Neuerscheinungen";
url = "http://www.arnshaugk.de/index.php";
filter = ["html2text" "strip"];
}
{
name = "Carolina Welslau";
url = "https://carolinawelslau.de/";

View File

@@ -104,6 +104,9 @@ in {
addresses = "news.r";
autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"];
command = "/oper aids balls";
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = nick + nick;
};
};
};

View File

@@ -0,0 +1,64 @@
{
config,
pkgs,
...
}: let
inherit (import <niveum/lib>) retiolumAddresses;
in {
imports = [
./hardware-configuration.nix
<niveum/configs/spacetime.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/sshd.nix>
];
nix.nixPath = ["/var/src"];
services.xserver = {
libinput.enable = true;
};
users.users.xenos = {
name = "xenos";
password = "xenos";
isNormalUser = true;
extraGroups = ["networkmanager"];
};
services.xserver = {
enable = true;
desktopManager.lxqt.enable = true;
displayManager = {
autoLogin = {
enable = true;
user = "xenos";
};
};
};
environment.systemPackages = [
pkgs.libreoffice
pkgs.gimp
pkgs.inkscape
pkgs.firefox
pkgs.pidgin
pkgs.git
pkgs.vim
];
networking = {
useDHCP = false;
interfaces = {
enp0s4.useDHCP = true;
wlp2s0.useDHCP = true;
};
retiolum = retiolumAddresses.tabula;
hostName = "tabula";
};
sound.enable = true;
hardware.pulseaudio.enable = true;
networking.networkmanager.enable = true;
system.stateVersion = "21.11";
}

View File

@@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
initrd = {
availableKernelModules = ["pata_sis" "ohci_pci" "ehci_pci" "sata_sis" "usb_storage" "sd_mod" "sr_mod"];
kernelModules = [];
};
kernelModules = [];
extraModulePackages = [];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/6fe3c127-068f-4b71-9cac-5fea66f66dc8";
fsType = "ext4";
};
swapDevices = [
{device = "/dev/disk/by-uuid/874256aa-5bae-44a4-8933-c65f8600fe78";}
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

49
systems/zaatar/atuin.nix Normal file
View File

@@ -0,0 +1,49 @@
{config, ...}: let
inherit (import <niveum/lib>) tmpfilesConfig;
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
in {
services.postgresql = {
enable = true;
dataDir = "/var/state/postgresql/${config.services.postgresql.package.psqlSchema}";
ensureDatabases = ["atuin"];
ensureUsers = [
{
name = "atuin";
ensurePermissions."DATABASE atuin" = "ALL PRIVILEGES";
}
];
};
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";
path = "/var/state/postgresql";
mode = "0700";
user = "postgres";
group = "postgres";
})
];
users.groups.atuin = {};
users.users.atuin = {
isSystemUser = true;
group = "atuin";
home = "/run/atuin";
createHome = true;
};
systemd.services.atuin = {
wantedBy = ["multi-user.target"];
environment = {
ATUIN_HOST = "0.0.0.0";
ATUIN_PORT = "8888";
ATUIN_OPEN_REGISTRATION = "true";
ATUIN_DB_URI = "postgres:///atuin";
};
serviceConfig = {
User = "atuin";
ExecStart = "${unstable.atuin}/bin/atuin server start";
};
};
networking.firewall.allowedTCPPorts = [8888];
}

View File

@@ -7,6 +7,7 @@
inherit (import <niveum/lib>) retiolumAddresses restic;
in {
imports = [
./atuin.nix
./backup.nix
./gaslight.nix
./hardware-configuration.nix
@@ -23,7 +24,7 @@ in {
<niveum/configs/printing.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix>
<niveum/configs/traadfri.nix>
# <niveum/configs/traadfri.nix>
<niveum/configs/tmux.nix>
<niveum/configs/wpa_supplicant.nix>
<niveum/modules/retiolum.nix>

View File

@@ -79,6 +79,10 @@ in {
113275 # ALEW
112783 # Akzent und Silbenstruktur
113493 # Papyrologie
# WS 2022
115414 # Nonnos
116108 # Dialektologie
];
download_submissions = true;
download_descriptions = true;