mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
Compare commits
313 Commits
20.09
...
80e91d1685
| Author | SHA1 | Date | |
|---|---|---|---|
| 80e91d1685 | |||
| c17b611af5 | |||
| c85b73a874 | |||
| ff49bb95a7 | |||
| 3a21680812 | |||
| 4f962778b7 | |||
| 4006c36f9b | |||
| eb521b2e0e | |||
| f178daaffd | |||
| f23e644417 | |||
| 0f432025ad | |||
| 7f009cfd08 | |||
| 94cdfa3ea3 | |||
| e75348e1cb | |||
| e13e421b75 | |||
| a3fa195089 | |||
| 35192198a7 | |||
| b93f4a49e0 | |||
| 9a4b9946cb | |||
| 9955d05152 | |||
| 141d5db610 | |||
| a4edbfd29d | |||
| 6f7d5eadbf | |||
| 1d6d8f8249 | |||
| 901ab8d6b0 | |||
| 5249d6ab0d | |||
| 9a00809a2d | |||
| 376a2e115c | |||
| aac1a2e813 | |||
| 28ef523c82 | |||
| c672260930 | |||
| 5cc34626e1 | |||
| 9f1f73ad21 | |||
| 5fdb612033 | |||
| 508bc908ce | |||
| 4cba5a0b8a | |||
| 71b5a8cb24 | |||
| 200bff8386 | |||
| 79fd340f82 | |||
| 69ed97a4ab | |||
| ebbbb537c3 | |||
| 556255ac8b | |||
| 6516c5c9b7 | |||
| b5d32d3962 | |||
| 766874a226 | |||
| 2e9386a6c2 | |||
| 9af10ecf46 | |||
| bd200b655d | |||
| 4adf8fea0a | |||
| 0f0b5658be | |||
| 4f8f3751f4 | |||
| 5b76c1439f | |||
| 3e684ae24a | |||
| 83afa6174a | |||
| 0d483bfc0c | |||
| dea9c3f0ed | |||
| f8b452901f | |||
| 80143fee87 | |||
| 834e5d9ef3 | |||
| 121d5e242f | |||
| b9748964d0 | |||
| 4ab7d0d92e | |||
| 08ada6b818 | |||
| a128813990 | |||
| 5eaee95ba1 | |||
| 5eba5b84f1 | |||
| 2a8495a92c | |||
| 5e62f0363d | |||
| 1c8c210f06 | |||
| 48ce381be0 | |||
| 777f24e37e | |||
| 78a50e9ae3 | |||
| b8967c8e5c | |||
| e3f3e4045a | |||
| 08ce7749b5 | |||
| d7adefc289 | |||
| 7472eb5028 | |||
| f85a8d2737 | |||
| 9724cdda54 | |||
| 6727df461d | |||
| 0f11a9398f | |||
| db07d68a60 | |||
| f4c8094ad8 | |||
| 04247c6ca1 | |||
| d99399009c | |||
| 19c1f7c50d | |||
| a983ce13f8 | |||
| b6fa1fc274 | |||
| 68e60b93ff | |||
| 3aabeea2c3 | |||
| 74c6fcd3a5 | |||
| 392ef95c4f | |||
| 5869807936 | |||
| e2a0ba3eed | |||
| 25c6f97693 | |||
| 12698d9f48 | |||
| 5dccdfee83 | |||
| 8420a2435d | |||
| ed732b3a65 | |||
| cbb676bf00 | |||
| 74b102e55e | |||
| c14f5925e2 | |||
| 9a7b6b020a | |||
| 68338c2791 | |||
| e74f9b6bd0 | |||
| a17201c28d | |||
| 2a94899db5 | |||
| bae1cb485c | |||
| 7f6e00a309 | |||
| 2a5ea9700b | |||
| 8b5bfd236d | |||
| 8302b1d9fb | |||
| 8f66163c39 | |||
| 7ad02f75a9 | |||
| 2f3d4fb3b1 | |||
| 005da63416 | |||
| beaf6c81e4 | |||
| 7c67d3f88a | |||
| 0d20cded25 | |||
| 6c1e8368a1 | |||
| ac1a7ac37e | |||
| 85a6001b53 | |||
| 4e107f3df7 | |||
| 37880ae746 | |||
| 155722a8cd | |||
| 73d71498c7 | |||
| e9b5c2623d | |||
| ddc4ca0db4 | |||
| 8fbaed35f8 | |||
| 87042f5409 | |||
| a9b1a03af1 | |||
| 010d620b76 | |||
| 18033c0e54 | |||
| 5cdf3637a5 | |||
| 9192fa458b | |||
| 40472e2ff8 | |||
| a592947bbf | |||
| 444336cd19 | |||
| 6ef578d644 | |||
| 8e19069d4c | |||
| 42df0dc7df | |||
| d6c10df13e | |||
| 8cbbb4b50d | |||
| bc23d7ac24 | |||
| 40f31fa316 | |||
| f73d8725c4 | |||
| 97fc0f82bf | |||
| ef3d6c4eaf | |||
| c6d7dbe787 | |||
| b9149c8d9a | |||
| 36502ecfd8 | |||
| 43fd4bbf19 | |||
| 37e851cc50 | |||
| 018f79f88d | |||
| 6843ac90b5 | |||
| afb69bf334 | |||
| ea57f539b0 | |||
| 3d10ac09ab | |||
| 38f088d9e5 | |||
| 422f2b8676 | |||
| 7c1ca72a29 | |||
| f171284b71 | |||
| ca50ba931a | |||
| 63ad607d46 | |||
| e553f1bcda | |||
| 8923f7a2c9 | |||
| 07024df1c9 | |||
| cb9bcf2d1d | |||
| 7aeda72026 | |||
| 95c93cc565 | |||
| c9979de250 | |||
| 7889d56b99 | |||
| 03be9636ad | |||
| 5d36ed4cd6 | |||
| c33446aee3 | |||
| fe7744bedb | |||
| 9673e9d3e8 | |||
| 5175f3f819 | |||
| 5923f3341a | |||
| 901cf6f711 | |||
| 859e536159 | |||
| 4ea18d0152 | |||
| c7c7017070 | |||
| 7c80f160db | |||
| 6fce803c70 | |||
| a6bff424b0 | |||
| d61b17c656 | |||
| cbdf8ef038 | |||
| 876dbe785b | |||
| fb4a14a6bf | |||
| 02977ea936 | |||
| dcca34d5c1 | |||
| 8bd8ec611f | |||
| 96a67a937e | |||
| fb85c29651 | |||
| 3344af5339 | |||
| fdfd8a687f | |||
| e804da180d | |||
| 2af8e1aa86 | |||
| 10224de58a | |||
| 2bf095c553 | |||
| a7d994abe7 | |||
| 680997fb12 | |||
| a2d1ab6f53 | |||
| 52761a13e2 | |||
| 98f7de9680 | |||
| 72f04f9391 | |||
| 10ad21a39c | |||
| 5c9e25f27a | |||
| 4b563ddf00 | |||
| d041e6fa52 | |||
| 8749646101 | |||
| 960311c65f | |||
| a70f05239a | |||
| d716e5716f | |||
| 2781930ecf | |||
| f34a938968 | |||
| 080439604b | |||
| 72df03fbf6 | |||
| b799e7c26f | |||
| 2a450e2f36 | |||
| 485e07ec9e | |||
| dcf3452353 | |||
| edc8e83594 | |||
| 01bc8178ad | |||
| eff303a854 | |||
| bc992a170c | |||
| 78e9bedcb4 | |||
| d5cdbf3795 | |||
| bcb5949e15 | |||
| dd61883648 | |||
| 1d7a432bec | |||
| 0e7652ff46 | |||
| a96c0d9ab3 | |||
| 82bb2d9f17 | |||
| 4fa0256095 | |||
| 2915594238 | |||
| cf48d89ea6 | |||
| 37f570a979 | |||
| f8af039913 | |||
| 46882af11e | |||
| 2c5d2f4add | |||
| bd089bd408 | |||
| fce8d15356 | |||
| acec2505e4 | |||
| 218c251d31 | |||
| 8cda7861f9 | |||
| a35c883eca | |||
| db61bc4b91 | |||
| 43fc9ebba2 | |||
| 23d60233a0 | |||
| f2fcc3be9a | |||
| 30e3baa335 | |||
| 616a530c64 | |||
| e5d437949b | |||
| 80c3b143ca | |||
| 263a732580 | |||
| c638ef93f5 | |||
| 69c2f506ae | |||
| db4857c86d | |||
| 6668542d53 | |||
| 561faed161 | |||
| 36ed681e99 | |||
| be84688b63 | |||
| de296c4e62 | |||
| d7807ba1b9 | |||
| 51fba9baa6 | |||
| a0fb2bd819 | |||
| a0830070f3 | |||
| c860529161 | |||
| 03461dcaaa | |||
| 1cd7039759 | |||
| af0806b766 | |||
| bd8960fd44 | |||
| 1bc90b2e84 | |||
| d2939795ac | |||
| 4a4d5a148d | |||
| f30cfbf142 | |||
| 15bda4721d | |||
| 4d610461b8 | |||
| eed54d1593 | |||
| ddec0551e8 | |||
| b0f2a74372 | |||
| 65584ec52f | |||
| 96f5d750ef | |||
| 77e97e84a9 | |||
| 96cb298584 | |||
| 5dc561da83 | |||
| b8c79fd21c | |||
| a98333a6b8 | |||
| fa5fe37610 | |||
| 0be0356005 | |||
| 394615168d | |||
| b6e77f77af | |||
| d7727433fd | |||
| 3f02559da2 | |||
| e7c801b6c4 | |||
| 3092fcda85 | |||
| 43a1ecedac | |||
| da55a342e3 | |||
| 48fcb08427 | |||
| a0855f8bbb | |||
| 3efb4682f2 | |||
| 048429f593 | |||
| 59cacae72e | |||
| 420245231a | |||
| 2911972900 | |||
| 5efcb813f0 | |||
| fd8f5d3a5c | |||
| 3508575ebe | |||
| 3741304284 | |||
| 6bfaf551d2 | |||
| 423cb074a0 |
38
.bin/256color
Executable file
38
.bin/256color
Executable 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
24
.bin/browser
Executable 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
25
.bin/candyman
Executable 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
13
.bin/countdown
Executable 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
34
.bin/horoscope.sh
Normal 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"
|
||||
81
.bin/lieferando.sh
Normal file
81
.bin/lieferando.sh
Normal 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}'
|
||||
3
.bin/mail-current-part
Executable file
3
.bin/mail-current-part
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
set -efu
|
||||
exec curl -fSs --unix-socket /tmp/much.api.sock http://localhost/current/part
|
||||
27
.bin/mail-current-query-find-part-by-name
Executable file
27
.bin/mail-current-query-find-part-by-name
Executable 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"
|
||||
39
.bin/mail-current-query-find-part-by-type
Executable file
39
.bin/mail-current-query-find-part-by-type
Executable 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
23
.bin/pdf-ocr.sh
Executable 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
2
.bin/playlist_entries.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
youtube-dl -ij "$*" | jq -sr '.[] | .webpage_url'
|
||||
4
.bin/readme
Executable file
4
.bin/readme
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
curl -sSL "https://raw.githubusercontent.com/$*/master/README.md" \
|
||||
| pandoc -f gfm -t man -s \
|
||||
| man -l -
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,6 +1,5 @@
|
||||
secrets.nix
|
||||
result
|
||||
.direnv
|
||||
.envrc
|
||||
.history
|
||||
**/*.bak
|
||||
.todo
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
x 2020-04-27 2019-08-27 fix offlineimap password
|
||||
x 2020-04-27 2019-07-09 @package fzf wrappers
|
||||
@@ -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
|
||||
@@ -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": "2aa20ae969f2597c4df10a094440a66e9d7f8c86",
|
||||
"date": "2021-04-07T15:46:34-04:00",
|
||||
"path": "/nix/store/lhln3za2gkh1myswi41jd7xsy8iagj83-home-manager",
|
||||
"sha256": "0i5fxaxqm53zp767smrn250q1wjywf9c1jmg6vhp28973p7jysah",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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": "7c679678d6fd5e9b6a37155fa7b66228341dc4fa",
|
||||
"date": "2021-05-03T12:47:27+01:00",
|
||||
"path": "/nix/store/j6sznqfiqsd39ra8rxm11pi52vis7aad-nixpkgs",
|
||||
"sha256": "1yi897052cy9s1c9il3h8774jmch1p7clyg0b5jrpq1px6bd29rd",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -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": "bba3474a5798b5a3a87e10102d1a55f19ec3fca5",
|
||||
"date": "2021-04-26T02:53:56+02:00",
|
||||
"path": "/nix/store/yh0manlyc4aa78n7fbzcjxmfnj4gn6jf-nixpkgs",
|
||||
"sha256": "0g261s4n3hdhm7l5flmyl8jjihla688ib12flvwsvcax1p8h34d5",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -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": "0d3f175804d51f7fad891b04a6f742ebb1c1c923",
|
||||
"date": "2021-04-16T23:02:19+02:00",
|
||||
"path": "/nix/store/489x2j1adwg3yhwadygxha7j00w67jzh-retiolum",
|
||||
"sha256": "1fxp397ndjl7qbzkh2dgipjfjj3sjbsd8bqd0p8sm3a9jgfgp7nn",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"url": "https://cgit.krebsco.de/stockholm",
|
||||
"rev": "b034f63f7a2e4361b32c33c0e1a980eecf1a5aa6",
|
||||
"date": "2020-10-17T01:00:54+02:00",
|
||||
"sha256": "1ji45h7xp3za5lq9qdg3f8gldrvqfpr8grinblzvf9iqxjgidr68",
|
||||
"fetchSubmodules": false
|
||||
"url": "https://github.com/kmein/stockholm",
|
||||
"rev": "f0325bef7954cb946674050847c6d52112cb658f",
|
||||
"date": "2020-11-11T07:45:58+01:00",
|
||||
"path": "/nix/store/lka6fhjfbwdx9bc7lk1bz4gizdv7nrbm-stockholm",
|
||||
"sha256": "0gbw6n5yq36ysc30afa5d2dbsl2d46f73ms6f0rprdbr4nhdw8l2",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -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 = "Add";
|
||||
mods = "Control";
|
||||
action = "IncreaseFontSize";
|
||||
}
|
||||
{
|
||||
key = "Minus";
|
||||
mods = "Control";
|
||||
action = "DecreaseFontSize";
|
||||
}
|
||||
{
|
||||
key = "Key0";
|
||||
mods = "Control";
|
||||
action = "ResetFontSize";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
configs/battery.nix
Normal file
17
configs/battery.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
<niveum/modules/seafile.nix>
|
||||
<niveum/modules/dropbox.nix>
|
||||
];
|
||||
|
||||
niveum = {
|
||||
dropbox.enable = true;
|
||||
seafile.enable = true;
|
||||
};
|
||||
|
||||
system.activationScripts.home-symlinks = ''
|
||||
@@ -16,7 +14,7 @@
|
||||
'';
|
||||
|
||||
home-manager.users.me = {
|
||||
services.nextcloud-client.enable = true;
|
||||
services.nextcloud-client.enable = false;
|
||||
};
|
||||
|
||||
services.syncthing = rec {
|
||||
@@ -28,26 +26,18 @@
|
||||
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 = [ "wilde" "manakish" ];
|
||||
"${cloud-dir}/syncthing/library".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/music".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/moodle" = {
|
||||
devices = [ "wilde" "toum" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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,18 @@ 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") {
|
||||
"https://github.com/nix-community/NUR/archive/222ea29ec4afb09c5565a7e5dda14bfd65a4a9f6.tar.gz") {
|
||||
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 +36,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>)
|
||||
@@ -88,13 +47,6 @@ in {
|
||||
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 = {
|
||||
programs.zathura = {
|
||||
@@ -113,11 +65,14 @@ 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;
|
||||
@@ -125,11 +80,22 @@ in {
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
||||
# 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 +116,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 +144,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,7 +174,10 @@ 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;
|
||||
@@ -276,7 +199,8 @@ in {
|
||||
./bluetooth.nix
|
||||
./ccc.nix
|
||||
./kleiter.nix
|
||||
./calcurse.nix
|
||||
./khal.nix
|
||||
./engiadina.nix
|
||||
./chromium.nix
|
||||
./cloud.nix
|
||||
./compton.nix
|
||||
@@ -295,35 +219,37 @@ 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
|
||||
./traadfri.nix
|
||||
./unclutter.nix
|
||||
./version.nix
|
||||
./vscode.nix
|
||||
./watson.nix
|
||||
./xautolock.nix
|
||||
./wifi.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
35
configs/engiadina.nix
Normal file
35
configs/engiadina.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||
cdnRoot = "/run/engiadina";
|
||||
in
|
||||
{
|
||||
systemd.tmpfiles.rules = map tmpfilesConfig [
|
||||
{
|
||||
type = "d";
|
||||
path = cdnRoot;
|
||||
mode = "0775";
|
||||
user = config.users.users.me.name;
|
||||
}
|
||||
{
|
||||
type = "x";
|
||||
path = "${cdnRoot}/*";
|
||||
}
|
||||
];
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) defaultApplications;
|
||||
flameshot-once =
|
||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||
in {
|
||||
@@ -16,7 +17,7 @@ in {
|
||||
enable = true;
|
||||
createUrl = "http://p.r/image";
|
||||
deleteUrl = "http://p.r/image/delete/%1";
|
||||
xdg-open.browser = "x-www-browser";
|
||||
xdg-open.browser = (defaultApplications pkgs).browser;
|
||||
};
|
||||
config.timeout = 200;
|
||||
})
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
niveum.fonts.size = 9;
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
enableFontDir = true;
|
||||
@@ -15,6 +13,8 @@
|
||||
libertine
|
||||
lmodern
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
roboto
|
||||
roboto-mono
|
||||
roboto-slab
|
||||
@@ -29,8 +29,8 @@
|
||||
];
|
||||
fontconfig.defaultFonts = {
|
||||
monospace = [ "JetBrains Mono" ];
|
||||
serif = [ "Source Serif Pro" ];
|
||||
sansSerif = [ "Source Sans Pro" ];
|
||||
serif = [ "Roboto Slab" ];
|
||||
sansSerif = [ "Roboto" "Noto Sans" ];
|
||||
emoji = [ "JoyPixels" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
13
configs/gitea.nix
Normal 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;";
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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 = {
|
||||
@@ -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 = {
|
||||
25
configs/hedgedoc.nix
Normal file
25
configs/hedgedoc.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
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 = false;
|
||||
allowGravatar = false;
|
||||
db = {
|
||||
dialect = "sqlite";
|
||||
storage = "/var/lib/codimd/db.codimd.sqlite";
|
||||
useCDN = false;
|
||||
};
|
||||
port = 3091;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -9,14 +9,14 @@
|
||||
detailedCpuTime = false;
|
||||
headerMargin = true;
|
||||
hideKernelThreads = true;
|
||||
hideThreads = false;
|
||||
hideUserlandThreads = false;
|
||||
hideThreads = true;
|
||||
hideUserlandThreads = true;
|
||||
highlightBaseName = true;
|
||||
highlightMegabytes = true;
|
||||
highlightThreads = true;
|
||||
shadowOtherUsers = true;
|
||||
showProgramPath = false;
|
||||
showThreadNames = true;
|
||||
showThreadNames = false;
|
||||
sortDescending = true;
|
||||
sortKey = "PERCENT_CPU";
|
||||
treeView = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ 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>;
|
||||
@@ -22,23 +23,60 @@ let
|
||||
}"
|
||||
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" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
trusted-cert = e5a7d56543002ffe1e8962caa5fd6d94053aa702381458247b670877a66f3c6f
|
||||
username = ${eduroam.identity}
|
||||
''}
|
||||
(pkgs.writers.writeDashBin "hu-ip" ''
|
||||
${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3
|
||||
'')
|
||||
];
|
||||
|
||||
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 = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359
|
||||
username = ${eduroam.identity}
|
||||
password = ${eduroam.password}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.openvpn-hu-berlin.conflicts = [ "hu-vpn.service" ];
|
||||
|
||||
services.openvpn.servers.hu-berlin = {
|
||||
autoStart = false;
|
||||
authUserPass = {
|
||||
|
||||
@@ -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,9 @@ let
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${pkgs.scripts.betacode}/bin/betacode
|
||||
'';
|
||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
||||
${pkgs.scripts.devanagari}/bin/devanagari
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -36,30 +40,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 +49,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 = [ "Sans 10" ];
|
||||
modifier = "Mod4";
|
||||
window = {
|
||||
titlebar = false;
|
||||
@@ -110,9 +106,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 +129,7 @@ in with config.niveum; {
|
||||
};
|
||||
bars = [{
|
||||
workspaceButtons = false;
|
||||
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
|
||||
fonts = [ "Sans 8" ];
|
||||
mode = "hide"; # "dock"
|
||||
position = "bottom";
|
||||
colors = rec {
|
||||
@@ -147,10 +143,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 +159,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}";
|
||||
@@ -196,12 +189,13 @@ in with config.niveum; {
|
||||
"${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,13 +215,14 @@ 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" =
|
||||
@@ -245,7 +240,7 @@ in with config.niveum; {
|
||||
"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";
|
||||
"XF86ScreenSaver" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
||||
|
||||
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
|
||||
|
||||
|
||||
123
configs/khal.nix
Normal file
123
configs/khal.nix
Normal 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}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
233
configs/mail.nix
233
configs/mail.nix
@@ -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
145
configs/mail/accounts.nix
Normal 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
52
configs/mail/client.nix
Normal 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 = nixpkgs-much.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
80
configs/mail/fetcher.nix
Normal 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" "wilde.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
56
configs/matterbridge.nix
Normal 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.freenode = {
|
||||
Server = "irc.freenode.net:6667";
|
||||
Nick = "ponte";
|
||||
StripMarkdown = true;
|
||||
};
|
||||
mumble.lassulus = {
|
||||
Server = "lassul.us:64738";
|
||||
Nick = "krebs_bridge";
|
||||
SkipTLSVerify = true;
|
||||
};
|
||||
gateway = [
|
||||
{
|
||||
name = "krebs-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "#krebs";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-330372458";
|
||||
}
|
||||
{
|
||||
account = "mumble.lassulus";
|
||||
channel = 6; # "nixos"
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
32
configs/moodle-dl/borsfaye.nix
Normal file
32
configs/moodle-dl/borsfaye.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
nixpkgs-kmein = builtins.fetchGit {
|
||||
url = "https://github.com/kmein/nixpkgs";
|
||||
ref = "refs/heads/feature/moodle-dl-module";
|
||||
rev = "ea2e0387ee946e575f7851ec21debc9179d82ad0";
|
||||
};
|
||||
|
||||
moodle-dl-package = (import nixpkgs-kmein {}).moodle-dl.overrideAttrs (old: old // {
|
||||
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
|
||||
});
|
||||
in
|
||||
{
|
||||
imports = [ "${nixpkgs-kmein}/nixos/modules/services/networking/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 = "/";
|
||||
};
|
||||
};
|
||||
}
|
||||
83
configs/moodle-dl/meinhark.nix
Normal file
83
configs/moodle-dl/meinhark.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
nixpkgs-kmein = builtins.fetchGit {
|
||||
url = "https://github.com/kmein/nixpkgs";
|
||||
ref = "refs/heads/feature/moodle-dl-module";
|
||||
rev = "11e035b133ea9fbf07bc1b6185990b095358ab4f";
|
||||
};
|
||||
|
||||
moodle-dl-package = (import nixpkgs-kmein {}).moodle-dl.overrideAttrs (old: old // {
|
||||
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
|
||||
});
|
||||
in
|
||||
{
|
||||
imports = [ "${nixpkgs-kmein}/nixos/modules/services/networking/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;
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = let moodle-dl-directory = config.services.moodle-dl.directory; in {
|
||||
enable = true;
|
||||
user = "moodle-dl"; # config.users.extraUsers.moodle.name;
|
||||
openDefaultPorts = true;
|
||||
configDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
dataDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
declarative = rec {
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
devices = {
|
||||
inherit ((import <niveum/lib>).syncthing.devices) wilde manakish toum;
|
||||
};
|
||||
folders.${moodle-dl-directory} = {
|
||||
devices = [ "toum" "wilde" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
97
configs/mpd-fm.nix
Normal file
97
configs/mpd-fm.nix
Normal file
@@ -0,0 +1,97 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
firewall = (import <niveum/lib>).firewall lib;
|
||||
|
||||
streams = import <niveum/lib/streams.nix> {
|
||||
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
multi-room-audio-port = 8000;
|
||||
password = lib.strings.fileContents <system-secrets/mpd-web.key>;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
<niveum/modules/mpd-fm.nix>
|
||||
];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "0.0.0.0";
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "zaatar single room audio system"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.mpc_cli ];
|
||||
|
||||
networking.firewall =
|
||||
let
|
||||
dport = config.services.mpd.network.port;
|
||||
protocol = "tcp";
|
||||
rules = [
|
||||
(firewall.accept { inherit dport protocol; source = "192.168.0.0/16"; })
|
||||
(firewall.accept { inherit dport protocol; source = "127.0.0.0/8"; })
|
||||
];
|
||||
in {
|
||||
allowedTCPPorts = [ 80 ];
|
||||
extraCommands = firewall.addRules rules;
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
};
|
||||
|
||||
system.activationScripts.mpd-playlists =
|
||||
let playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||
in ''
|
||||
rm -rf /var/lib/mpd/playlists
|
||||
install -d /var/lib/mpd/playlists
|
||||
ln -sfn "${toString playlistFile}" "/var/lib/mpd/playlists/radio.m3u"
|
||||
'';
|
||||
|
||||
services.mpd-fm = {
|
||||
enable = true;
|
||||
# stationsFile = "/etc/mpd-fm/stations.json";
|
||||
stations = lib.lists.imap0 (id: {desc ? "", logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300", stream, station}: { inherit id desc logo stream station; }) streams;
|
||||
webPort = 8080;
|
||||
};
|
||||
|
||||
systemd.services.mpd-fm-stations =
|
||||
let
|
||||
stations = lib.lists.imap0 (id: {desc ? "", logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300", stream, station}: { inherit id desc logo stream station; }) streams;
|
||||
stationsJson = (pkgs.formats.json {}).generate "stations.json" stations;
|
||||
in {
|
||||
wantedBy = [ "mpd-fm.service" ];
|
||||
startAt = "hourly";
|
||||
script = ''
|
||||
mkdir -p /etc/mpd-fm
|
||||
antenne_asb_url=$(
|
||||
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
|
||||
| grep streamUrl \
|
||||
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
|
||||
)
|
||||
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/mpd-fm/stations.json
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts.default = {
|
||||
basicAuth.dj = password;
|
||||
locations."= /listen.ogg" = {
|
||||
proxyPass = "http://127.0.0.1:${toString multi-room-audio-port}";
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.mpd-fm.webPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
{ pkgs, ... }: let
|
||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.mpv = swallow "mpv";
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
force-window = "yes";
|
||||
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
|
||||
ytdl-format = "bestvideo+bestaudio/best";
|
||||
};
|
||||
bindings = {
|
||||
"Alt+RIGHT" = "add video-rotate 90";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
10
configs/nix.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# enable `nix flake`
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
# extraOptions = ''
|
||||
# experimental-features = nix-command
|
||||
# '';
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{ config, ... }: {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
unstable = import <nixpkgs-unstable> { config = config.nixpkgs.config; };
|
||||
};
|
||||
}
|
||||
19
configs/openweathermap.nix
Normal file
19
configs/openweathermap.nix
Normal 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 ];
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
{ 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; };
|
||||
in {
|
||||
imports = [
|
||||
./krebs.nix
|
||||
./writing.nix
|
||||
@@ -32,26 +37,24 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
# INTERNET
|
||||
aria2
|
||||
firefox
|
||||
# tor-browser-bundle-bin
|
||||
# qutebrowser
|
||||
# firefox
|
||||
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
|
||||
@@ -74,12 +77,14 @@
|
||||
ncdu # ncurses disk usage
|
||||
python3Packages.jsonschema # json validation
|
||||
jq # json toolkit
|
||||
pup # html toolkit
|
||||
jo # json creation
|
||||
xsv # csv toolkit
|
||||
xmlstarlet # xml toolkit
|
||||
manpages
|
||||
posix_man_pages
|
||||
# moreutils # for parallel, sponge, combine
|
||||
tree
|
||||
parallel # for parallel, since moreutils shadows task spooler
|
||||
ripgrep # better grep
|
||||
rlwrap
|
||||
@@ -97,18 +102,25 @@
|
||||
audacity
|
||||
calibre
|
||||
inkscape
|
||||
zoom-us # video conferencing
|
||||
nixpkgs-unstable.zoom-us # video conferencing
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
poppler_utils # pdf toolkit
|
||||
evince # for viewing pdf annotations
|
||||
xournal # for annotating pdfs
|
||||
xournalpp # for annotating pdfs
|
||||
hc # print files as qr codes
|
||||
youtubeDL
|
||||
bc # calculator
|
||||
pari # gp -- better calculator
|
||||
scripts.infschmv
|
||||
scripts.default-gateway
|
||||
scripts.showkeys-toggle
|
||||
scripts.favicon
|
||||
scripts.ipa # XSAMPA to IPA converter
|
||||
scripts.playlist
|
||||
scripts.devanagari
|
||||
scripts.betacode # ancient greek betacode to unicode converter
|
||||
scripts.meteo
|
||||
nur.repos.kmein.mahlzeit
|
||||
# nur.repos.kmein.slide
|
||||
nur.repos.kmein.vimv
|
||||
@@ -121,20 +133,44 @@
|
||||
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 "ncmpcpp-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
|
||||
|
||||
spotify
|
||||
spotify-tui
|
||||
playerctl
|
||||
|
||||
nix-index
|
||||
scripts.nix-index-update
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
|
||||
zoteroStyle = { name, sha256 }: {
|
||||
name = "${name}.csl";
|
||||
path = pkgs.fetchurl {
|
||||
@@ -15,17 +17,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 +30,6 @@ let
|
||||
name = "dic/${name}";
|
||||
inherit path;
|
||||
}) dicts);
|
||||
scardanelli = config.networking.hostName == "scardanelli";
|
||||
in {
|
||||
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
|
||||
{
|
||||
@@ -69,12 +64,16 @@ in {
|
||||
texlive.combined.scheme-full
|
||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
||||
haskellPackages.pandoc-citeproc
|
||||
# nur.repos.kmein.text2pdf
|
||||
nur.repos.kmein.text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
unstable.pandoc
|
||||
# gnumeric
|
||||
dia
|
||||
nixpkgs-unstable.pandoc
|
||||
# proselint
|
||||
asciidoctor
|
||||
wordnet
|
||||
sdcv # stardict cli
|
||||
# sdcv # stardict cli
|
||||
];
|
||||
}
|
||||
|
||||
24
configs/power-action.nix
Normal file
24
configs/power-action.nix
Normal 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}
|
||||
'';
|
||||
}
|
||||
303
configs/radio.nix
Normal file
303
configs/radio.nix
Normal file
@@ -0,0 +1,303 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
|
||||
radioStore = "/var/lib/radio";
|
||||
htgenPort = 8080;
|
||||
meddl = { streamPort = 8000; mpdPort = 6600; };
|
||||
lyrikline = { streamPort = 8001; mpdPort = 6601; };
|
||||
lyrik = { streamPort = 8002; mpdPort = 6602; };
|
||||
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
|
||||
'';
|
||||
|
||||
mpc-lyrikline = pkgs.writers.writeDashBin "mpc-lyrikline" ''MPD_PORT=${toString lyrikline.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
mpc-meddl = pkgs.writers.writeDashBin "mpc-meddl" ''MPD_PORT=${toString meddl.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
mpc-lyrik = pkgs.writers.writeDashBin "mpc-lyrik" ''MPD_PORT=${toString lyrik.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
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;
|
||||
|
||||
containers.lyrik = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = lyrik.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
|
||||
audio_output {
|
||||
name "Lyrik-Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString lyrik.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
krebs.htgen.radio = {
|
||||
port = htgenPort;
|
||||
user.name = "radio";
|
||||
script = ''. ${pkgs.writers.writeDash "meinskript" ''
|
||||
case "$Method $Request_URI" in
|
||||
"GET /lyrik/status")
|
||||
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'
|
||||
|
||||
video_id="$(
|
||||
MPD_PORT=${toString lyrik.mpdPort} ${pkgs.mpc_cli}/bin/mpc 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' \
|
||||
| ${nixpkgs-unstable.pandoc}/bin/pandoc -s
|
||||
|
||||
exit
|
||||
;;
|
||||
"GET /lyrikline/status")
|
||||
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'
|
||||
|
||||
hash="$(
|
||||
MPD_PORT=${toString lyrikline.mpdPort} ${pkgs.mpc_cli}/bin/mpc 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
|
||||
;;
|
||||
"POST /meddl/skip")
|
||||
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'
|
||||
${mpc-meddl}/bin/mpc-meddl next
|
||||
exit
|
||||
;;
|
||||
"GET /meddl/status")
|
||||
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'
|
||||
|
||||
hash="$(
|
||||
MPD_PORT=${toString meddl.mpdPort} ${pkgs.mpc_cli}/bin/mpc 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.meddl = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = meddl.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
volume_normalization "yes"
|
||||
|
||||
audio_output {
|
||||
name "DrachenLord Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString meddl.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
containers.lyrikline = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = lyrikline.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
|
||||
audio_output {
|
||||
name "lyrikline.org Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString lyrikline.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.lyrikline = {
|
||||
after = [ "container@lyrikline.service" ];
|
||||
wantedBy = [ "container@lyrikline.service" ];
|
||||
startAt = "*:00/5";
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
preStart = "${mpc-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"
|
||||
|
||||
${mpc-lyrikline}/bin/mpc-lyrikline add "$poem_file"
|
||||
done
|
||||
|
||||
${mpc-lyrikline}/bin/mpc-lyrikline play
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.lyrik = {
|
||||
after = [ "container@lyrik.service" ];
|
||||
wantedBy = [ "container@lyrik.service" ];
|
||||
preStart = "${mpc-lyrik}/bin/mpc-lyrik crop || :";
|
||||
restartIfChanged = true;
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
script =
|
||||
let
|
||||
videoIds = import <niveum/lib/hot-rotation/lyrik.nix>;
|
||||
streams = lib.concatMapStringsSep "\n" (id: "https://au.ytprivate.com/latest_version?id=${id}&itag=251") videoIds;
|
||||
streamsFile = pkgs.writeText "hotrot" streams;
|
||||
in ''
|
||||
set -efu
|
||||
${mpc-lyrik}/bin/mpc-lyrik add < ${toString streamsFile}
|
||||
|
||||
${mpc-lyrik}/bin/mpc-lyrik crossfade 5
|
||||
${mpc-lyrik}/bin/mpc-lyrik random on
|
||||
${mpc-lyrik}/bin/mpc-lyrik repeat on
|
||||
${mpc-lyrik}/bin/mpc-lyrik play
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
systemd.services.meddl = {
|
||||
after = [ "container@meddl.service" ];
|
||||
wantedBy = [ "container@meddl.service" ];
|
||||
startAt = "*:00/10";
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
preStart = "${mpc-meddl}/bin/mpc-meddl crop || :";
|
||||
script = ''
|
||||
set -efu
|
||||
host=http://antenne-asb.ga
|
||||
|
||||
prepend_host() {
|
||||
sed "s#^#$host/#"
|
||||
}
|
||||
|
||||
${pkgs.curl}/bin/curl -sSL "$host" \
|
||||
| ${pkgs.pup}/bin/pup 'li a attr{href}' \
|
||||
| prepend_host \
|
||||
| while read -r song; do
|
||||
song_url="$(${pkgs.curl}/bin/curl -sSL "$song" \
|
||||
| ${pkgs.pup}/bin/pup 'audio source attr{src}' \
|
||||
| prepend_host
|
||||
)"
|
||||
|
||||
hash="$(echo "$song_url" | md5sum | cut -d' ' -f 1)"
|
||||
echo "$song_url ($hash) -> $song"
|
||||
echo "$song" > "${radioStore}/$hash"
|
||||
|
||||
${mpc-meddl}/bin/mpc-meddl add "$song_url"
|
||||
done
|
||||
|
||||
${mpc-meddl}/bin/mpc-meddl play
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ mpc-lyrikline mpc-lyrik mpc-meddl ];
|
||||
|
||||
services.nginx.virtualHosts."radio.xn--kiern-0qa.de".locations = {
|
||||
"= /meddl/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /meddl/listen.ogg".proxyPass = "http://127.0.0.1:${toString meddl.streamPort}";
|
||||
"= /meddl/skip".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrikline/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrikline/listen.ogg".proxyPass = "http://127.0.0.1:${toString lyrikline.streamPort}";
|
||||
"= /lyrik/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrik/listen.ogg".proxyPass = "http://127.0.0.1:${toString lyrik.streamPort}";
|
||||
"= /lyrik.ogg".return = "301 http://radio.xn--kiern-0qa.de/lyrik/listen.ogg";
|
||||
"= /meddl.ogg".return = "301 http://radio.xn--kiern-0qa.de/meddl/listen.ogg";
|
||||
"= /lyrikline.ogg".return = "301 http://radio.xn--kiern-0qa.de/lyrikline/listen.ogg";
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
20
configs/seafile.nix
Normal 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
7
configs/spacetime.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
location = {
|
||||
latitude = 52.517;
|
||||
longitude = 13.3872;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
24
configs/spotifyd.nix
Normal file
24
configs/spotifyd.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
config = lib.generators.toINI { } {
|
||||
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";
|
||||
}
|
||||
@@ -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,19 +15,24 @@ 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 = "kfm";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
wilde = {
|
||||
@@ -50,6 +40,14 @@ in {
|
||||
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
16
configs/sshd.nix
Normal 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;
|
||||
}
|
||||
@@ -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 { };
|
||||
@@ -24,6 +24,7 @@ in {
|
||||
./autorenkalender.nix
|
||||
./proverb.nix
|
||||
./nachtischsatan.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
];
|
||||
|
||||
systemd.services.telegram-odyssey = {
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#454545";
|
||||
dark = "#222222";
|
||||
};
|
||||
red = {
|
||||
bright = "#FA8072";
|
||||
dark = "#B22222";
|
||||
};
|
||||
green = {
|
||||
bright = "#779A3E";
|
||||
dark = "#556B2F";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#DAA520";
|
||||
dark = "#B8860B";
|
||||
};
|
||||
blue = {
|
||||
bright = "#6495ED";
|
||||
dark = "#4682B4";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#DA70D6";
|
||||
dark = "#9932CC";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#B0E0E6";
|
||||
dark = "#87CEEB";
|
||||
};
|
||||
white = {
|
||||
bright = "#FFFFFF";
|
||||
dark = "#C0C0C0";
|
||||
};
|
||||
background = "#000000";
|
||||
foreground = "#AAAAAA";
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#818383";
|
||||
dark = "#000000";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc391f";
|
||||
dark = "#c23621";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#eaec23";
|
||||
dark = "#adad27";
|
||||
};
|
||||
green = {
|
||||
bright = "#31e722";
|
||||
dark = "#25bc24";
|
||||
};
|
||||
blue = {
|
||||
bright = "#5833ff";
|
||||
dark = "#492ee1";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#f935f8";
|
||||
dark = "#d338d3";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#14f0f0";
|
||||
dark = "#33bbc8";
|
||||
};
|
||||
white = {
|
||||
bright = "#e9ebeb";
|
||||
dark = "#cbcccd";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = 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 = "#181818";
|
||||
foreground = white.dark;
|
||||
cursor = "#bbbbbb";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = 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";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = black.bright;
|
||||
foreground = blue.bright;
|
||||
cursor = cyan.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = white.bright;
|
||||
foreground = yellow.bright;
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
{ lib, config, ... }:
|
||||
let inherit (config.niveum) theme colourPalette;
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
theme = (import <niveum/lib>).theme pkgs;
|
||||
in {
|
||||
console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette;
|
||||
|
||||
environment.systemPackages =
|
||||
[ theme.gtk.package theme.icon.package theme.cursor.package ];
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
get-todo-dir = pkgs.writers.writeDash "git-toplevel-todo" ''
|
||||
if GIT_TOPLEVEL=$(${pkgs.git}/bin/git rev-parse --show-toplevel 2>/dev/null); then
|
||||
echo "$GIT_TOPLEVEL/.todo"
|
||||
else
|
||||
echo "$HOME/cloud/Dropbox/todo"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
home-manager.users.me.home.file.".todo/config".text = ''
|
||||
export TODO_DIR="$(${get-todo-dir})"
|
||||
|
||||
export TODO_FILE="$TODO_DIR/todo.txt"
|
||||
export DONE_FILE="$TODO_DIR/done.txt"
|
||||
export REPORT_FILE="$TODO_DIR/report.txt"
|
||||
'';
|
||||
|
||||
environment = {
|
||||
systemPackages = [ pkgs.todo-txt-cli ];
|
||||
shellAliases.t = "todo.sh";
|
||||
variables.TODOTXT_DEFAULT_ACTION = "ls";
|
||||
};
|
||||
}
|
||||
@@ -29,6 +29,7 @@ in
|
||||
bedroom = 131082;
|
||||
living-room = living-room-id;
|
||||
bedside = 131087;
|
||||
desk = 131089;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
131
configs/urlwatch.nix
Normal file
131
configs/urlwatch.nix
Normal file
@@ -0,0 +1,131 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
urlwatchDir = "/var/lib/urlwatch";
|
||||
|
||||
urlsFile = pkgs.writeText "urls" (builtins.concatStringsSep "\n---\n" (map builtins.toJSON urls));
|
||||
|
||||
urls = [
|
||||
{
|
||||
name = "Corona-Verordnung";
|
||||
url = "https://www.berlin.de/corona/massnahmen/verordnung/";
|
||||
filter = [ { css = "[role=main]"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "HU Semester";
|
||||
url = "https://agnes.hu-berlin.de/lupo/rds?state=change&type=6&moduleParameter=semesterSelect&nextdir=change&next=SearchSelect.vm&subdir=applications&targettype=7&targetstate=change&getglobal=semester";
|
||||
filter = [ { css = "fieldset"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Kratylos";
|
||||
url = "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
filter = [ { element-by-id = "content"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Indogermanische Forschungen";
|
||||
url = "https://www.degruyter.com/journal/key/INDO/html";
|
||||
filter = [ { element-by-id = "latestIssue"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "IG Nekrolog";
|
||||
url = "https://www.indogermanistik.org/aktuelles/nekrologe.html";
|
||||
filter = [ { css = "[itemprop=articleBody]"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "IG Neuigkeiten";
|
||||
url = "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
filter = [ { css = "[itemprop=articleBody]"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "IG Tagungen";
|
||||
url = "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
filter = [ { css = "[itemprop=articleBody]"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Christian-Metz-Blamage";
|
||||
url = "https://www.deutschlandfunk.de/meine-nacht-schlaeft-nicht-pflanze-mich-nicht-in-dein-herz.700.de.html?dram:article_id=486475";
|
||||
filter = [ { element-by-class = "dlf-articledetail"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "fxght.or.flxght";
|
||||
url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
||||
headers.tellonym-client = "web:0.52.0";
|
||||
filter = [
|
||||
{
|
||||
shellpipe = ''
|
||||
${pkgs.jq}/bin/jq '.answers | map({
|
||||
question: .tell,
|
||||
answer: .answer,
|
||||
date: .createdAt,
|
||||
media: .media | map(.url)
|
||||
})'
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
configFile = (pkgs.formats.yaml {}).generate "urlwatch.yaml" {
|
||||
display = {
|
||||
error = true;
|
||||
new = true;
|
||||
unchanged = false;
|
||||
};
|
||||
report = {
|
||||
email = {
|
||||
enabled = true;
|
||||
from = "2210@cock.li";
|
||||
html = false;
|
||||
method = "smtp";
|
||||
smtp = {
|
||||
host = "mail.cock.li";
|
||||
port = 587;
|
||||
starttls = true;
|
||||
auth = true;
|
||||
insecure_password = lib.strings.fileContents <secrets/mail/cock>;
|
||||
};
|
||||
subject = "{count} changes: {jobs}";
|
||||
to = kieran.email;
|
||||
};
|
||||
html.diff = "unified";
|
||||
stdout = {
|
||||
color = true;
|
||||
enabled = true;
|
||||
};
|
||||
text.footer = false;
|
||||
# telegram = {
|
||||
# enabled = false;
|
||||
# bot_token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
# chat_id = [ "18980945" ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
urlwatch = pkgs.urlwatch.overrideAttrs (attrs: {
|
||||
patches = [ <niveum/packages/urlwatch-insecure.patch> ];
|
||||
});
|
||||
in
|
||||
{
|
||||
users.extraUsers.urlwatch = {
|
||||
home = urlwatchDir;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
systemd.services.urlwatch = {
|
||||
enable = true;
|
||||
startAt = "*-*-* 05:00:00";
|
||||
script = ''
|
||||
${urlwatch}/bin/urlwatch \
|
||||
--config=${lib.escapeShellArg configFile} \
|
||||
--urls=${lib.escapeShellArg urlsFile}
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = config.users.extraUsers.urlwatch.name;
|
||||
WorkingDirectory = config.users.extraUsers.urlwatch.home;
|
||||
PermissionsStartOnly = "true";
|
||||
PrivateTmp = "true";
|
||||
SyslogIdentifier = "urlwatch";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,19 +16,34 @@ let
|
||||
rev = "33cad3099919366cea2627f930da9b47609e8554";
|
||||
sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i";
|
||||
};
|
||||
*/
|
||||
kmein-wallpapers = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "wallpapers";
|
||||
rev = "7c553bc6bd78afa6dbf2824691466bbad0d8e6e9";
|
||||
sha256 = "1zik5z1cq1084j1hdwm204afz89f5hpg21z0vvcbppzkmldfxnnq";
|
||||
};
|
||||
*/
|
||||
in {
|
||||
imports = [ <stockholm/krebs/3modules/fetchWallpaper.nix> ];
|
||||
|
||||
krebs.fetchWallpaper = {
|
||||
enable = true;
|
||||
# unitConfig.ConditionPathExists = "!/var/run/ppp0.pid";
|
||||
url = "http://prism.r/realwallpaper-krebs-stars.png"; # http://prism.r/realwallpaper-krebs.png"; # "http://prism.r/realwallpaper-krebs-stars-berlin.png";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
display = lib.mkForce 0; # needed for fetchWallpaper to find the X display
|
||||
displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +LOCAL:";
|
||||
};
|
||||
|
||||
/*
|
||||
home-manager.users.me = {
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${kmein-wallpapers}/saudade";
|
||||
imageDirectory = "${kmein-wallpapers}/meteora";
|
||||
interval = "1h";
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.watson ];
|
||||
|
||||
system.activationScripts.watsonFiles = ''
|
||||
install -d ${config.users.users.me.home}/.config/watson/
|
||||
ln -sf ${config.users.users.me.home}/cloud/Dropbox/watson-frames.json ${config.users.users.me.home}/.config/watson/frames
|
||||
'';
|
||||
}
|
||||
|
||||
94
configs/weechat.nix
Normal file
94
configs/weechat.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran nixpkgs-unstable;
|
||||
relayPassword = lib.fileContents <system-secrets/weechat/relay>;
|
||||
in {
|
||||
systemd.services.weechat =
|
||||
let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
|
||||
set-option -g prefix `
|
||||
unbind-key C-b
|
||||
bind ` send-prefix
|
||||
|
||||
set-option -g status off
|
||||
set-option -g default-terminal screen-256color
|
||||
|
||||
#use session instead of windows
|
||||
bind-key c new-session
|
||||
bind-key p switch-client -p
|
||||
bind-key n switch-client -n
|
||||
bind-key C-s switch-client -l
|
||||
''} "$@"
|
||||
'';
|
||||
weechat = pkgs.weechat.override {
|
||||
configure = { ... }: {
|
||||
scripts = [ pkgs.weechatScripts.weechat-autosort nixpkgs-unstable.weechatScripts.colorize_nicks ];
|
||||
init = let coolColors = lib.lists.subtractLists (lib.range 52 69 ++ lib.range 231 248) (lib.range 31 254); in ''
|
||||
/set irc.server_default.nicks "kmein"
|
||||
/set irc.server_default.msg_part "tschö mit ö"
|
||||
/set irc.server_default.msg_quit "ciao kakao"
|
||||
/set irc.server_default.msg_kick "warum machst du diese?"
|
||||
/set irc.server_default.realname "${kieran.name}"
|
||||
|
||||
/set irc.look.color_nicks_in_nicklist "on"
|
||||
/set weechat.color.chat_nick_colors "${lib.concatMapStringsSep "," toString coolColors}"
|
||||
|
||||
/server add hackint irc.hackint.org/6697 -ipv6 -ssl
|
||||
/server add freenode chat.freenode.org/6697 -ssl
|
||||
/server add irc.r irc.r
|
||||
/server add news.r news.r
|
||||
|
||||
/alias add mod /quote omode $channel +o $nick
|
||||
|
||||
/relay add weechat 9000
|
||||
/set relay.network.password ${relayPassword}
|
||||
|
||||
/set irc.server.freenode.autojoin "#krebs,#flipdot,##myengadin,##fysitech,#nixos,#nixos-de,#haskell"
|
||||
/set irc.server.hackint.autojoin "#hsmr"
|
||||
/set irc.server.irc.r.autojoin "#xxx,#brockman,#flix"
|
||||
/set irc.server.news.r.autojoin "#cook,#drachengame,#oepnv,#kmeinung,#memes"
|
||||
/set irc.server.news.r.command "/oper aids balls"
|
||||
/set logger.level.irc.news.r.#all 0
|
||||
|
||||
/filter addreplace corona irc.news.r.* * [kc]orona|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]tion|in[cz]iden[cz]|sars-cov
|
||||
/filter addreplace joinquit * irc_join,irc_part,irc_quit *
|
||||
|
||||
/set irc.look.server_buffer independent
|
||||
|
||||
/connect freenode
|
||||
/connect hackint
|
||||
/connect irc.r
|
||||
/connect news.r
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
description = "Weechat bouncer";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
path = [ pkgs.alacritty.terminfo ];
|
||||
environment.WEECHAT_HOME = "/var/lib/weechat";
|
||||
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
||||
preStop = "${tmux} kill-session -t IM";
|
||||
serviceConfig = {
|
||||
User = "weechat";
|
||||
RemainAfterExit = true;
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.weechat = {};
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys pkgs ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@heym"
|
||||
];
|
||||
createHome = true;
|
||||
group = "weechat";
|
||||
home = "/var/lib/weechat";
|
||||
isSystemUser = true;
|
||||
packages = [ pkgs.tmux ];
|
||||
};
|
||||
}
|
||||
51
configs/wifi.nix
Normal file
51
configs/wifi.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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";
|
||||
"b-base".pskRaw = "44040369a63d5bce4576637e8d34aeb3ed3d178011386decb99da473418e9861";
|
||||
"c-base".pskRaw = "1355ccb287407bcd0caa4a7a399367c28b1e11bf5da34dd100d4b86ac4cafe46";
|
||||
"o2-WLAN66".pskRaw = "9fc24da5ee0c7cf73321f5efa805370c246c4121413ea4f2373c0b7e41ec65e4";
|
||||
"Vodafone-8012".pskRaw = "45a998e3e07f83ae0b4f573535fb3ccfd808b364a22f349878ced889a6fffe2c";
|
||||
"yinyin".pskRaw = "ee85005d339df61e1e1a8484b96318513e15c46f222c3c06e8959fbc256569e7";
|
||||
"Light Hope".psk = "FriendsofMara63069!";
|
||||
"WG-Jung".psk = "BerlinMadridParisTokyo";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
suspendIfBored = false;
|
||||
|
||||
xlockModes = lib.concatStringsSep "\\n" [
|
||||
# "braid"
|
||||
"galaxy"
|
||||
# "lightning"
|
||||
# "matrix"
|
||||
"pyro2"
|
||||
"space"
|
||||
];
|
||||
my-xlock = pkgs.writers.writeDashBin "xlock" ''
|
||||
MODE=$(printf "${xlockModes}" | shuf -n 1)
|
||||
|
||||
${pkgs.xlockmore}/bin/xlock \
|
||||
-saturation 0.4 \
|
||||
-erasemode no_fade \
|
||||
+description \
|
||||
-showdate \
|
||||
-username " " \
|
||||
-password " " \
|
||||
-info " " \
|
||||
-validate "..." \
|
||||
-invalid "Computer says no." \
|
||||
-mode "$MODE"
|
||||
'';
|
||||
in {
|
||||
services.xserver.xautolock = rec {
|
||||
enable = true;
|
||||
killer =
|
||||
if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null;
|
||||
locker = "${my-xlock}/bin/xlock";
|
||||
nowlocker = locker;
|
||||
enableNotifier = true;
|
||||
notifier = ''
|
||||
${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."'';
|
||||
};
|
||||
}
|
||||
33
deploy.nix
33
deploy.nix
@@ -1,4 +1,6 @@
|
||||
let
|
||||
inherit (import ./lib/default.nix) sshPort;
|
||||
|
||||
gitFromJson = path:
|
||||
let object = importJson path;
|
||||
in {
|
||||
@@ -16,8 +18,8 @@ let
|
||||
system.file = toString path;
|
||||
nixos-config.symlink = "system/configuration.nix";
|
||||
|
||||
nixpkgs.git = gitFromJson .versions/nixpkgs.json;
|
||||
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json;
|
||||
nixpkgs.git = gitFromJson .versions/nixpkgs.json // { shallow = true; };
|
||||
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json // { shallow = true; };
|
||||
home-manager.git = gitFromJson .versions/home-manager.json;
|
||||
stockholm.git = gitFromJson .versions/stockholm.json;
|
||||
retiolum.git = gitFromJson .versions/retiolum.json;
|
||||
@@ -30,19 +32,14 @@ let
|
||||
name = "shared";
|
||||
};
|
||||
}];
|
||||
target = "root@${address}:22022";
|
||||
target = "root@${address}:${toString sshPort}";
|
||||
};
|
||||
inherit (pkgs.krops) writeDeploy;
|
||||
in {
|
||||
scardanelli = writeDeploy "deploy-scardanelli" (regularSystem {
|
||||
path = systems/scardanelli;
|
||||
name = "scardanelli";
|
||||
address = "scardanelli.r";
|
||||
});
|
||||
homeros = writeDeploy "deploy-homeros" (regularSystem {
|
||||
path = systems/homeros;
|
||||
name = "homeros";
|
||||
address = "homeros.r";
|
||||
zaatar = writeDeploy "deploy-zaatar" (regularSystem {
|
||||
path = systems/zaatar;
|
||||
name = "zaatar";
|
||||
address = "zaatar.r";
|
||||
});
|
||||
wilde = writeDeploy "deploy-wilde" (regularSystem {
|
||||
path = systems/wilde;
|
||||
@@ -53,5 +50,17 @@ in {
|
||||
path = systems/toum;
|
||||
name = "toum";
|
||||
address = "toum.r";
|
||||
}) // {
|
||||
buildTarget = "${builtins.getEnv "USER"}@localhost/${builtins.getEnv "HOME"}/.cache/krops";
|
||||
};
|
||||
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
||||
path = systems/makanek;
|
||||
name = "makanek";
|
||||
address = "makanek.r";
|
||||
});
|
||||
manakish = writeDeploy "deploy-manakish" (regularSystem {
|
||||
path = systems/manakish;
|
||||
name = "manakish";
|
||||
address = "manakish.r";
|
||||
});
|
||||
}
|
||||
|
||||
24
dot/htoprc
24
dot/htoprc
@@ -1,24 +0,0 @@
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=46
|
||||
sort_direction=1
|
||||
hide_threads=0
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=1
|
||||
show_thread_names=1
|
||||
show_program_path=1
|
||||
highlight_base_name=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=1
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=1
|
||||
color_scheme=0
|
||||
delay=15
|
||||
left_meters=LeftCPUs2 RightCPUs2 Memory Swap
|
||||
left_meter_modes=1 1 1 1
|
||||
right_meters=Uptime Tasks LoadAverage Battery
|
||||
right_meter_modes=2 2 2 2
|
||||
@@ -1,41 +0,0 @@
|
||||
{ token }: {
|
||||
general = {
|
||||
RemoteNickFormat = "[{NOPINGNICK}] ";
|
||||
Charset = "utf-8";
|
||||
};
|
||||
telegram.kmein.Token = token;
|
||||
irc.freenode = {
|
||||
Server = "irc.freenode.net:6667";
|
||||
Nick = "tg_bridge";
|
||||
};
|
||||
gateway = [
|
||||
{
|
||||
name = "krebs-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "#krebs";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-330372458";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "myengadin-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "##myengadin";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-425759153";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user