Compare commits
1 Commits
bc2d4fb005
...
mail
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a31717c27 |
@@ -1,38 +0,0 @@
|
|||||||
#! /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
@@ -1,24 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#!/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}'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
set -efu
|
|
||||||
exec curl -fSs --unix-socket /tmp/much.api.sock http://localhost/current/part
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#! /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"
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#! /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"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
youtube-dl -ij "$*" | jq -sr '.[] | .webpage_url'
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
curl -sSL "https://raw.githubusercontent.com/$*/master/README.md" \
|
|
||||||
| pandoc -f gfm -t man -s \
|
|
||||||
| man -l -
|
|
||||||
6
.gitignore
vendored
@@ -1,6 +1,2 @@
|
|||||||
|
secrets.nix
|
||||||
result
|
result
|
||||||
.direnv
|
|
||||||
.envrc
|
|
||||||
.history
|
|
||||||
.todo
|
|
||||||
node_modules
|
|
||||||
|
|||||||
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
|||||||
[submodule "submodules/much"]
|
|
||||||
path = submodules/much
|
|
||||||
url = git@github.com:kmein/much
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/nix-community/home-manager.git",
|
|
||||||
"rev": "35a24648d155843a4d162de98c17b1afd5db51e4",
|
|
||||||
"date": "2021-06-21T00:35:57+02:00",
|
|
||||||
"path": "/nix/store/8n5b5wcdn1cqrbly2pqkin8ihl8b2vpv-home-manager",
|
|
||||||
"sha256": "06w327cvbqpi2fpl5rqk664vrl0ls0jqfkzx8vgvbcn1pmxsl0y3",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://cgit.krebsco.de/krops",
|
|
||||||
"rev": "cccebf3ff7a53336b3f106cb96dddd5892d427ed",
|
|
||||||
"date": "2021-03-23T22:47:37+01:00",
|
|
||||||
"path": "/nix/store/mz13xxnil35lwsf90hwnrm2agir7hb51-krops",
|
|
||||||
"sha256": "07mg3iaqjf1w49vmwfchi7b1w55bh7rvsbgicp2m47gnj9alwdb6",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/mozilla/nixpkgs-mozilla",
|
|
||||||
"rev": "3f3fba4e2066f28a1ad7ac60e86a688a92eb5b5f",
|
|
||||||
"date": "2021-06-03T15:29:39+02:00",
|
|
||||||
"path": "/nix/store/aklhz1c8gppv2wrf64haa92qdl77f0jg-nixpkgs-mozilla",
|
|
||||||
"sha256": "1mrj89gzrzhci4lssvzmmk31l715cddp7l39favnfs1qaijly814",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
|
||||||
"rev": "e4ee74de2d2003aa863177672b1383b55d40a7bf",
|
|
||||||
"date": "2021-06-30T11:10:27+02:00",
|
|
||||||
"path": "/nix/store/110hqprcj3b5xk9sax00cpbnnfp15rvy-nixpkgs",
|
|
||||||
"sha256": "1c0qbim6vfgmvxsr01prpsrmrj5rzg8mbfhyz7wb08kp048lxkkv",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
|
||||||
"rev": "71326cd12ddfa0fac40fdb451fcba7dad763c56e",
|
|
||||||
"date": "2021-06-29T09:31:02+02:00",
|
|
||||||
"path": "/nix/store/110psm19cnca2l4lg966fd3vj7q57yhj-nixpkgs",
|
|
||||||
"sha256": "1939fwll9xwm7mf5crz7gfvz41c8gqd8wg7fy2v6m71viiq8lrda",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/nix-community/NUR",
|
|
||||||
"rev": "7c88425dc9189b1beea4c6984a18a7d686a208eb",
|
|
||||||
"date": "2021-06-30T08:10:41+00:00",
|
|
||||||
"path": "/nix/store/209ky0din17bbb0554n505gwq98bwx7y-NUR",
|
|
||||||
"sha256": "1wymg65543j3jsld2ma4bz6ax05fwl9ynd7cn31w6g12p17fg619",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://github.com/krebs/retiolum",
|
|
||||||
"rev": "6eca607e1bb3d4088a5536344eb67a66d912a3f2",
|
|
||||||
"date": "2021-06-16T14:32:18+02:00",
|
|
||||||
"path": "/nix/store/szi4p83xs5n5diqncmrrwsp7bk4h3llm-retiolum",
|
|
||||||
"sha256": "1kzxqpqgvvz4rva3mfq0l3ri7ggnx96pwzmsp2f016xpiz8brf0y",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://cgit.krebsco.de/stockholm",
|
|
||||||
"rev": "6c1f1c26e7a5e2d11cc8a1d43d86568c760af526",
|
|
||||||
"date": "2021-06-18T20:59:04+02:00",
|
|
||||||
"path": "/nix/store/4g1qxaxjba1c6nk64z7j653w5wy4k2k1-stockholm",
|
|
||||||
"sha256": "16af154q7bf4i15ywc3zs3dhzc96lnd276wdl7h0a7c6wk59xa1w",
|
|
||||||
"fetchSubmodules": false,
|
|
||||||
"deepClone": false,
|
|
||||||
"leaveDotGit": false
|
|
||||||
}
|
|
||||||
BIN
art/.haskell-grey.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
art/37333571_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
art/55991392_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
art/58991926_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 512 KiB |
BIN
art/59560674_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 653 KiB |
BIN
art/68479906_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 325 KiB |
BIN
art/69915574_p0_master1200.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
art/d7ujb9p-e1389b42-5b67-422f-8f23-ddd280a7889a.jpg
Normal file
|
After Width: | Height: | Size: 477 KiB |
BIN
art/file (1).jpeg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
art/file.jpeg
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
art/sky_full_of_stars_by_baxiaart_d7vsofp-fullview.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
art/the_view_by_xlocky-d988pnv.jpg
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
art/tumblr_p3p4cdjUB61qe959eo1_1280.jpg
Normal file
|
After Width: | Height: | Size: 345 KiB |
BIN
art/turn_into_stars_by_awanqi_d9z2go0-fullview.jpg
Normal file
|
After Width: | Height: | Size: 210 KiB |
@@ -1,45 +0,0 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
|
||||||
{
|
|
||||||
environment.variables.TERMINAL = "alacritty";
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.alacritty
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me.xdg.configFile =
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) colours;
|
|
||||||
colourNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
|
|
||||||
colourPairs = lib.getAttrs colourNames colours;
|
|
||||||
in {
|
|
||||||
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
|
|
||||||
background_opacity = 0.9;
|
|
||||||
colors = {
|
|
||||||
primary = { inherit (colours) background foreground; };
|
|
||||||
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
|
|
||||||
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
|
|
||||||
};
|
|
||||||
font = {
|
|
||||||
normal.family = "Monospace";
|
|
||||||
size = 6;
|
|
||||||
};
|
|
||||||
key_bindings = [
|
|
||||||
{
|
|
||||||
key = "Plus";
|
|
||||||
mods = "Control";
|
|
||||||
action = "IncreaseFontSize";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Minus";
|
|
||||||
mods = "Control";
|
|
||||||
action = "DecreaseFontSize";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Key0";
|
|
||||||
mods = "Control";
|
|
||||||
action = "ResetFontSize";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
promptInit = ''
|
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
|
||||||
PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set -o vi
|
set -o vi
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
{ 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,11 +1,16 @@
|
|||||||
{ pkgs, lib, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.General.Enable =
|
extraConfig = ''
|
||||||
lib.concatStringsSep "," [ "Source" "Sink" "Media" "Socket" ];
|
[General]
|
||||||
|
Enable=Source,Sink,Media,Socket
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.blueman ];
|
environment.systemPackages = [ pkgs.blueman ];
|
||||||
|
|
||||||
home-manager.users.me = { services.blueman-applet.enable = false; };
|
home-manager.users.me = {
|
||||||
|
services.blueman-applet.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
|
||||||
let
|
|
||||||
certificate = pkgs.stdenv.mkDerivation rec {
|
|
||||||
name = "dst-root-ca-x3.pem";
|
|
||||||
src = builtins.toFile "${name}.sed" ''
|
|
||||||
1,/DST Root CA X3/d
|
|
||||||
1,/-----END CERTIFICATE-----/p
|
|
||||||
'';
|
|
||||||
nativeBuildInputs = with pkgs; [ cacert gnused ];
|
|
||||||
phases = "installPhase";
|
|
||||||
installPhase = ''
|
|
||||||
${pkgs.gnused}/bin/sed -n -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
networking.wireless.networks."36C3" = {
|
|
||||||
auth = ''
|
|
||||||
key_mgmt=WPA-EAP
|
|
||||||
eap=TTLS
|
|
||||||
identity="kmein"
|
|
||||||
password=" "
|
|
||||||
ca_cert="${certificate}"
|
|
||||||
altsubject_match="DNS:radius.c3noc.net"
|
|
||||||
phase2="auth=PAP"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensions = [
|
extensions = [
|
||||||
"nngceckbapebfimnlniiiahkandclblb" # BitWarden
|
"hdokiejnpimakedhajhdlcegeplioahd" # LastPass
|
||||||
# "ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
|
"ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
|
||||||
# "fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
|
"fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
|
||||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
||||||
"khncfooichmfjbepaaaebmommgaepoid" # Remove YouTube Recommended Videos
|
"iaalpfgpbocpdfblpnhhgllgbdbchmia" # asciidoctor
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.chromium pkgs.brave ];
|
environment.systemPackages = [ pkgs.chromium ];
|
||||||
|
|
||||||
environment.variables.BROWSER = "brave";
|
niveum.applications.browser = "chromium";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/modules/dropbox.nix>
|
<modules/seafile.nix>
|
||||||
|
<modules/google-drive.nix>
|
||||||
|
<modules/dropbox.nix>
|
||||||
|
<stockholm/krebs/3modules/syncthing.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
niveum = {
|
niveum.dropbox = {
|
||||||
dropbox.enable = true;
|
enable = true;
|
||||||
|
user = config.users.users.me;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.home-symlinks = ''
|
niveum.seafile = {
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
enable = true;
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
user = config.users.users.me;
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
|
};
|
||||||
'';
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
niveum.google-drive = rec {
|
||||||
services.nextcloud-client.enable = true;
|
enable = true;
|
||||||
|
directory = "${user.home}/cloud/gdrive";
|
||||||
|
user = config.users.users.me;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.syncthing = rec {
|
services.syncthing = rec {
|
||||||
@@ -23,22 +29,20 @@
|
|||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
configDir = "/home/kfm/.config/syncthing";
|
configDir = "/home/kfm/.config/syncthing";
|
||||||
dataDir = "/home/kfm/.config/syncthing";
|
dataDir = "/home/kfm/.config/syncthing";
|
||||||
declarative = rec {
|
};
|
||||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
|
||||||
key = toString <system-secrets/syncthing/key.pem>;
|
krebs.syncthing = rec {
|
||||||
inherit ((import <niveum/lib>).syncthing) devices;
|
enable = true;
|
||||||
folders =
|
key = toString <secrets/syncthing/key.pem>;
|
||||||
let cloud-dir = "${config.users.users.me.home}/cloud";
|
cert = toString <secrets/syncthing/cert.pem>;
|
||||||
in {
|
peers = {
|
||||||
"${cloud-dir}/syncthing/common".devices = [ "wilde" "manakish" ];
|
homeros.id = "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
|
||||||
"${cloud-dir}/syncthing/library".devices = [ "wilde" "manakish" "heym" ];
|
scardanelli.id = "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
|
||||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "wilde" "manakish" "heym" ];
|
rilke.id = "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
|
||||||
"${cloud-dir}/syncthing/music".devices = [ "wilde" "manakish" "heym" ];
|
wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||||
"${cloud-dir}/moodle" = {
|
|
||||||
devices = [ "wilde" "toum" "manakish" ];
|
|
||||||
id = "moodle-dl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
folders."${config.users.users.me.home}/cloud/syncthing/common".peers = [ "homeros" "scardanelli" "wilde" ];
|
||||||
|
folders."${config.users.users.me.home}/cloud/syncthing/library".peers = lib.attrNames peers;
|
||||||
|
folders."${config.users.users.me.home}/cloud/syncthing/mundoiu".peers = lib.attrNames peers;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
services.compton = {
|
services.compton = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shadow = true;
|
shadow = true;
|
||||||
menuOpacity = 0.9;
|
menuOpacity = "0.9";
|
||||||
shadowOpacity = 0.3;
|
shadowOpacity = "0.3";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,164 +1,258 @@
|
|||||||
{ pkgs, lib, config, options, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
{
|
||||||
inherit (lib.strings) makeBinPath;
|
|
||||||
inherit (import <niveum/lib>) localAddresses kieran;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
|
<modules/constants.nix>
|
||||||
|
{
|
||||||
|
services.dbus.packages = [ pkgs.gnome3.dconf ];
|
||||||
|
}
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
<niveum/modules/system-dependent.nix>
|
# <configs/mopidy.nix>
|
||||||
|
<configs/bash.nix>
|
||||||
|
<configs/bluetooth.nix>
|
||||||
|
<configs/chromium.nix>
|
||||||
|
<configs/cloud.nix>
|
||||||
|
<configs/compton.nix>
|
||||||
|
<configs/default.nix>
|
||||||
|
# <configs/home-assistant.nix>
|
||||||
|
<configs/distrobump.nix>
|
||||||
|
<configs/docker.nix>
|
||||||
|
<configs/dunst.nix>
|
||||||
|
<configs/fonts.nix>
|
||||||
|
<configs/git.nix>
|
||||||
|
<configs/haskell>
|
||||||
|
<configs/hledger.nix>
|
||||||
|
<configs/htop.nix>
|
||||||
|
<configs/hu-berlin.nix>
|
||||||
|
<configs/i3.nix>
|
||||||
|
<configs/kdeconnect.nix>
|
||||||
|
<configs/keybase.nix>
|
||||||
|
<configs/keyboard.nix>
|
||||||
|
<configs/mail.nix>
|
||||||
|
<configs/mpv.nix>
|
||||||
|
<configs/nano.nix>
|
||||||
|
<configs/neovim.nix>
|
||||||
|
<configs/nixpkgs-unstable.nix>
|
||||||
|
<configs/packages>
|
||||||
|
<configs/printing.nix>
|
||||||
|
<configs/python.nix>
|
||||||
|
<configs/random-background.nix>
|
||||||
|
<configs/redshift.nix>
|
||||||
|
<configs/retiolum.nix>
|
||||||
|
<configs/rofi.nix>
|
||||||
|
<configs/sncli.nix>
|
||||||
|
<configs/ssh.nix>
|
||||||
|
<configs/sudo.nix>
|
||||||
|
<configs/themes/owickstrom-dark.nix>
|
||||||
|
<configs/theming.nix>
|
||||||
|
<configs/tmux.nix>
|
||||||
|
<configs/todo-txt.nix>
|
||||||
|
<configs/traadfri.nix>
|
||||||
|
<configs/unclutter.nix>
|
||||||
|
<configs/urxvt.nix>
|
||||||
|
<configs/vscode.nix>
|
||||||
|
<configs/xautolock.nix>
|
||||||
|
<configs/xresources.nix>
|
||||||
|
<configs/zsh.nix>
|
||||||
{
|
{
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
niveum.user = {
|
||||||
|
github = "kmein";
|
||||||
|
email = "kieran.meinhardt@gmail.com";
|
||||||
|
name = "Kierán Meinhardt";
|
||||||
|
};
|
||||||
|
|
||||||
|
niveum.applications = rec {
|
||||||
|
fileManager = "${config.niveum.applications.terminal} -e ${pkgs.ranger}/bin/ranger";
|
||||||
|
};
|
||||||
|
|
||||||
|
niveum.theme = {
|
||||||
|
gtk = { name = "Arc"; package = pkgs.arc-theme; };
|
||||||
|
icon = { name = "Arc"; package = pkgs.arc-icon-theme; };
|
||||||
|
cursor = { name = "capitaine-cursors"; package = pkgs.capitaine-cursors; };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
nix.nixPath = [
|
nixpkgs.config = {
|
||||||
"/var/src"
|
allowUnfree = true;
|
||||||
"nixpkgs-overlays=${toString ../overlays}"
|
packageOverrides = pkgs: {
|
||||||
];
|
python3Packages = pkgs.python3Packages.override {
|
||||||
}
|
overrides = new: old: {
|
||||||
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
|
spotify-cli-linux = new.callPackage <packages/spotify-cli-linux.nix> {};
|
||||||
{
|
instaloader = new.callPackage <packages/instaloader.nix> {};
|
||||||
nixpkgs = {
|
sncli = new.callPackage <packages/sncli.nix> {};
|
||||||
config = {
|
};
|
||||||
allowUnfree = true;
|
};
|
||||||
packageOverrides = pkgs: {
|
haskellPackages = pkgs.haskellPackages.override {
|
||||||
nur = import <nur> { inherit pkgs; };
|
overrides = new: old: {
|
||||||
writeDashBin = pkgs.writers.writeDashBin;
|
blessings = new.callPackage <packages/blessings.nix> {};
|
||||||
writeDash = pkgs.writers.writeDash;
|
scanner = new.callPackage <stockholm/krebs/5pkgs/haskell/scanner.nix> {};
|
||||||
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
|
};
|
||||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
|
};
|
||||||
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
|
git-quick-stats = pkgs.callPackage <packages/git-quick-stats.nix> {};
|
||||||
|
writeDash = pkgs.writers.writeDash;
|
||||||
|
writeDashBin = pkgs.writers.writeDashBin;
|
||||||
|
iolanguage = pkgs.callPackage <packages/iolanguage.nix> {};
|
||||||
|
nix-git = pkgs.callPackage <packages/nix-git.nix> {};
|
||||||
|
|
||||||
|
kmein = {
|
||||||
|
autorenkalender = pkgs.callPackage <packages/autorenkalender.nix> {};
|
||||||
|
bvg = pkgs.callPackage <packages/bvg.nix> {};
|
||||||
|
daybook = pkgs.callPackage <packages/daybook.nix> {};
|
||||||
|
font-size = pkgs.callPackage <packages/font-size.nix> { font = config.niveum.fonts.terminal; };
|
||||||
|
genius = pkgs.callPackage <packages/genius.nix> {};
|
||||||
|
instaget = pkgs.callPackage <packages/instaget.nix> {};
|
||||||
|
literature-quote = pkgs.callPackage <packages/literature-quote.nix> {};
|
||||||
|
n = pkgs.callPackage <packages/n.nix> {};
|
||||||
|
depp = pkgs.callPackage <packages/depp.nix> {};
|
||||||
|
odyssey = pkgs.callPackage <packages/odyssey.nix> {};
|
||||||
|
wttr = pkgs.callPackage <packages/wttr.nix> {};
|
||||||
|
nav = pkgs.callPackage <packages/nav.nix> {};
|
||||||
|
slide =
|
||||||
|
let slide-package = pkgs.fetchFromGitHub {
|
||||||
|
owner = "kmein";
|
||||||
|
repo = "slide";
|
||||||
|
rev = "0470583d22212745eab4f46076267addf4d2346c";
|
||||||
|
sha256 = "0skcp3va9v4hmxy5ramghpz53gnyxv10wsacgmc2jr0v1wrqlzbh";
|
||||||
|
};
|
||||||
|
in pkgs.callPackage slide-package {};
|
||||||
|
haskellPackages.mnemosyne =
|
||||||
|
let mnemosyne-package = pkgs.fetchFromGitHub {
|
||||||
|
repo = "mnemosyne";
|
||||||
|
owner = "kmein";
|
||||||
|
rev = "6bfa13c88db176af80be90840ff03573d67d679f";
|
||||||
|
sha256 = "1rimv5c5q9602y501hbkgkfbimqnmdkcr5hp1434q06gcazhjhca";
|
||||||
|
};
|
||||||
|
in pkgs.haskellPackages.callPackage mnemosyne-package {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overlays = [
|
|
||||||
(self: super: {
|
|
||||||
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
|
|
||||||
})
|
|
||||||
(import <stockholm/krebs/5pkgs/haskell>)
|
|
||||||
(import <stockholm/submodules/nix-writers/pkgs>)
|
|
||||||
(import <stockholm/krebs/5pkgs/override>)
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
boot.cleanTmpDir = true;
|
boot.cleanTmpDir = true;
|
||||||
boot.loader.timeout = 1;
|
boot.loader.timeout = 1;
|
||||||
|
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
options = {
|
options.selection-clipboard = "clipboard";
|
||||||
selection-clipboard = "clipboard";
|
|
||||||
# first-page-column = "1:1"; # makes side-by-side mode start on the left side
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
|
|
||||||
users.users.me = {
|
users.users.me = {
|
||||||
name = "kfm";
|
name = "kfm";
|
||||||
description = kieran.name;
|
description = config.niveum.user.name;
|
||||||
hashedPassword =
|
home = "/home/kfm";
|
||||||
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
createHome = true;
|
||||||
isNormalUser = true;
|
group = "users";
|
||||||
uid = 1000;
|
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
||||||
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me.xdg.enable = true;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pulseaudioFull;
|
package = pkgs.pulseaudioFull; # for bluetooth sound output
|
||||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
|
||||||
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
|
|
||||||
zeroconf.discovery.enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
load-module ${toString [
|
|
||||||
"module-tunnel-sink-new"
|
|
||||||
"server=zaatar.r"
|
|
||||||
"sink_name=zaatar"
|
|
||||||
"channels=2"
|
|
||||||
"rate=44100"
|
|
||||||
]}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.me.extraGroups = [ "audio" ];
|
users.users.me.extraGroups = [ "audio" ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.pavucontrol pkgs.ncpamixer pkgs.pamixer pkgs.pulsemixer ];
|
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
environment.interactiveShellInit =
|
environment.systemPackages = [
|
||||||
"export PATH=$PATH:$HOME/projects/niveum";
|
(pkgs.writers.writeDashBin "niveum-deploy" ''
|
||||||
environment.shellAliases = let
|
NIVEUM_DIR=/home/kfm/prog/git/niveum
|
||||||
wcd = pkgs.writers.writeDash "wcd" ''
|
|
||||||
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
|
[ $# -eq 1 ] || echo >&2 "Usage: niveum-deploy SYSTEM"
|
||||||
'';
|
|
||||||
where = pkgs.writers.writeDash "where" ''
|
eval $(nix-build --no-out-link "$NIVEUM_DIR/deploy.nix" -A "$1")
|
||||||
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
|
'')
|
||||||
'';
|
(pkgs.writers.writeDashBin "niveum-update" ''
|
||||||
take = pkgs.writers.writeDash "take" ''
|
NIVEUM_DIR=/home/kfm/prog/git/niveum
|
||||||
mkdir "$1" && cd "$1"
|
|
||||||
'';
|
nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-${config.system.stateVersion} > "$NIVEUM_DIR/nixpkgs.json"
|
||||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
'')
|
||||||
in {
|
];
|
||||||
"ß" = "${pkgs.utillinux}/bin/setsid";
|
}
|
||||||
cat = "${pkgs.bat}/bin/bat --style=plain";
|
{
|
||||||
chromium-incognito =
|
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.cargo/bin";
|
||||||
"chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
|
environment.shellAliases = {
|
||||||
cp = "cp --interactive";
|
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
||||||
ip = "${pkgs.iproute}/bin/ip -c";
|
|
||||||
l = "ls --color=auto --time-style=long-iso --almost-all";
|
|
||||||
ls = "ls --color=auto --time-style=long-iso";
|
|
||||||
ll = "ls --color=auto --time-style=long-iso -l";
|
|
||||||
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";
|
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
|
||||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
|
||||||
rm = "rm --interactive";
|
|
||||||
s = "${pkgs.systemd}/bin/systemctl";
|
|
||||||
take = "source ${take}";
|
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
|
ip = "${pkgs.iproute}/bin/ip -c";
|
||||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
ns = "nix-shell --run zsh";
|
||||||
us = "${pkgs.systemd}/bin/systemctl --user";
|
nixi = ''nix repl "<nixpkgs>"'';
|
||||||
wcd = "source ${wcd}";
|
rm = "rm -i";
|
||||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
cp = "cp -i";
|
||||||
where = "source ${where}";
|
mv = "mv -i";
|
||||||
yt =
|
l = "${pkgs.exa}/bin/exa -a";
|
||||||
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
ls = "${pkgs.exa}/bin/exa";
|
||||||
yta =
|
ll = "${pkgs.exa}/bin/exa -l";
|
||||||
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
la = "${pkgs.exa}/bin/exa -la";
|
||||||
|
dig = "dig +short";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{ i18n.defaultLocale = "en_GB.UTF-8"; }
|
{
|
||||||
{ services.illum.enable = true; }
|
networking.wireless = {
|
||||||
|
enable = true;
|
||||||
|
userControlled.enable = true;
|
||||||
|
networks = {
|
||||||
|
"Aether".pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||||
|
"Asoziales Netzwerk".pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
||||||
|
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
||||||
|
"FlixBus Wi-Fi" = {};
|
||||||
|
"FlixBus" = {};
|
||||||
|
"FlixTrain" = {};
|
||||||
|
"Libertarian WiFi".pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
|
||||||
|
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
|
||||||
|
"WIFIonICE" = {};
|
||||||
|
"WLAN-914742".psk = "67647139648174545446";
|
||||||
|
"WLAN-XVMU6T".pskRaw = "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
|
||||||
|
"c-base-public" = {};
|
||||||
|
"discord".psk = "baraustrinken";
|
||||||
|
"security-by-obscurity".psk = "44629828256481964386";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
networking.hosts = {
|
||||||
|
"192.168.178.1" = [ "fritz.box" ];
|
||||||
|
"192.168.178.21" = [ "scardanelli" ];
|
||||||
|
"192.168.178.22" = [ "homeros" ];
|
||||||
|
"192.168.178.24" = [ "catullus" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
services.illum.enable = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager = {
|
displayManager.lightdm = {
|
||||||
autoLogin = {
|
enable = true;
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = config.users.users.me.name;
|
||||||
|
greeters.gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = config.users.users.me.name;
|
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
|
||||||
};
|
|
||||||
lightdm = {
|
|
||||||
enable = true;
|
|
||||||
greeters.gtk = {
|
|
||||||
enable = true;
|
|
||||||
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
desktopManager.default = "none";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -167,86 +261,14 @@ in {
|
|||||||
pumount.source = "${pkgs.pmount}/bin/pumount";
|
pumount.source = "${pkgs.pmount}/bin/pumount";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{ programs.command-not-found.enable = true; }
|
|
||||||
{
|
{
|
||||||
programs.gnupg.agent.enable = true;
|
programs.command-not-found.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.gnupg
|
|
||||||
(pkgs.pass.withExtensions (e: [e.pass-otp]))
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
services.atd.enable = true;
|
programs.java = {
|
||||||
}
|
enable = true;
|
||||||
{
|
package = pkgs.openjdk;
|
||||||
services.getty = {
|
|
||||||
greetingLine = lib.mkForce "";
|
|
||||||
helpLine = lib.mkForce "";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
networking.hosts = lib.mapAttrs' (name: address: {
|
|
||||||
name = address;
|
|
||||||
value = [ "${name}.local" ];
|
|
||||||
}) localAddresses;
|
|
||||||
}
|
|
||||||
./alacritty.nix
|
|
||||||
./bash.nix
|
|
||||||
./bluetooth.nix
|
|
||||||
./ccc.nix
|
|
||||||
./kleiter.nix
|
|
||||||
./khal.nix
|
|
||||||
./engiadina.nix
|
|
||||||
./chromium.nix
|
|
||||||
./cloud.nix
|
|
||||||
./compton.nix
|
|
||||||
./direnv.nix
|
|
||||||
./distrobump.nix
|
|
||||||
./docker.nix
|
|
||||||
./dunst.nix
|
|
||||||
./flix.nix
|
|
||||||
./fonts.nix
|
|
||||||
./fzf.nix
|
|
||||||
./gaslight.nix
|
|
||||||
./git.nix
|
|
||||||
./hledger.nix
|
|
||||||
./htop.nix
|
|
||||||
./hu-berlin.nix
|
|
||||||
./i3.nix
|
|
||||||
./keybase.nix
|
|
||||||
./keyboard.nix
|
|
||||||
./mail/client.nix
|
|
||||||
./mpv.nix
|
|
||||||
./mime.nix
|
|
||||||
./nano.nix
|
|
||||||
./neovim.nix
|
|
||||||
./nix.nix
|
|
||||||
./newsboat.nix
|
|
||||||
./flameshot-once.nix
|
|
||||||
./packages
|
|
||||||
./power-action.nix
|
|
||||||
./printing.nix
|
|
||||||
./openweathermap.nix
|
|
||||||
./wallpaper.nix
|
|
||||||
./redshift.nix
|
|
||||||
./retiolum.nix
|
|
||||||
./rofi.nix
|
|
||||||
./spacetime.nix
|
|
||||||
./seafile.nix
|
|
||||||
./ssh.nix
|
|
||||||
./sshd.nix
|
|
||||||
./sudo.nix
|
|
||||||
./sxiv.nix
|
|
||||||
./theming.nix
|
|
||||||
./tmux.nix
|
|
||||||
./tor.nix
|
|
||||||
./traadfri.nix
|
|
||||||
./unclutter.nix
|
|
||||||
./version.nix
|
|
||||||
./vscode.nix
|
|
||||||
./watson.nix
|
|
||||||
./wifi.nix
|
|
||||||
./zsh.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
nixify = pkgs.writers.writeDashBin "nixify" ''
|
|
||||||
set -efuC
|
|
||||||
|
|
||||||
if [ ! -e ./.envrc ]; then
|
|
||||||
echo use_nix > .envrc
|
|
||||||
direnv allow
|
|
||||||
fi
|
|
||||||
if [ ! -e shell.nix ]; then
|
|
||||||
cat > shell.nix <<'EOF'
|
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [];
|
|
||||||
shellHook = "export HISTFILE=''${toString ./.history}";
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
''${EDITOR:-vim} shell.nix
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
environment.systemPackages = [ pkgs.direnv nixify ];
|
|
||||||
|
|
||||||
home-manager.users.me.programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
stdlib = builtins.readFile ("${
|
|
||||||
pkgs.fetchFromGitHub {
|
|
||||||
owner = "Mic92";
|
|
||||||
repo = "dotfiles";
|
|
||||||
rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df";
|
|
||||||
sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg";
|
|
||||||
}
|
|
||||||
}/home/.direnvrc");
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh.interactiveShellInit = ''
|
|
||||||
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
{ lib, config, pkgs, ... }: {
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
|
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
|
||||||
inherit lib config;
|
inherit lib config;
|
||||||
pkgs = pkgs // { writeDash = pkgs.writers.writeDash; };
|
pkgs = pkgs // {
|
||||||
|
writeDash = pkgs.writers.writeDash;
|
||||||
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
makefu.distrobump.enable = false;
|
makefu.distrobump.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
users.users.me.extraGroups = [ "docker" ];
|
users.users.me.extraGroups = [ "docker" ];
|
||||||
environment.systemPackages = [ pkgs.docker pkgs.docker_compose ];
|
environment.systemPackages = [ pkgs.docker pkgs.docker_compose ];
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
with config.niveum; {
|
||||||
inherit (import <niveum/lib>) defaultApplications colours theme;
|
|
||||||
in {
|
|
||||||
home-manager.users.me.services.dunst = {
|
home-manager.users.me.services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = (theme pkgs).icon;
|
iconTheme = theme.icon;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
transparency = 10;
|
transparency = 10;
|
||||||
font = "Monospace 8";
|
font = "${fonts.terminal.name} ${toString fonts.terminal.size}";
|
||||||
geometry = "200x5-30+20";
|
geometry = "200x5-30+20";
|
||||||
frame_color = colours.foreground;
|
frame_color = colours.foreground;
|
||||||
follow = "mouse";
|
follow = "mouse";
|
||||||
@@ -20,7 +18,7 @@ in {
|
|||||||
separator_color = "auto";
|
separator_color = "auto";
|
||||||
sort = true;
|
sort = true;
|
||||||
markup = "full";
|
markup = "full";
|
||||||
format = "%a\\n<b>%s</b>\\n%b";
|
format = ''%a\n<b>%s</b>\n%b'';
|
||||||
alignment = "left";
|
alignment = "left";
|
||||||
show_age_threshold = 60;
|
show_age_threshold = 60;
|
||||||
bounce_freq = 0;
|
bounce_freq = 0;
|
||||||
@@ -33,7 +31,7 @@ in {
|
|||||||
sticky_history = true;
|
sticky_history = true;
|
||||||
history_length = 20;
|
history_length = 20;
|
||||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||||
browser = (defaultApplications pkgs).browser;
|
browser = applications.browser;
|
||||||
verbosity = "mesg";
|
verbosity = "mesg";
|
||||||
corner_radius = 0;
|
corner_radius = 0;
|
||||||
mouse_left_click = "do_action";
|
mouse_left_click = "do_action";
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
|
||||||
cdnRoot = "/var/lib/engiadina";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <stockholm/krebs/3modules/permown.nix> ];
|
|
||||||
|
|
||||||
krebs.permown.${cdnRoot} = {
|
|
||||||
owner = config.users.users.me.name;
|
|
||||||
group = "users";
|
|
||||||
umask = "0002";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts.default = {
|
|
||||||
root = cdnRoot;
|
|
||||||
listen = [{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 3333;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.shellAliases = {
|
|
||||||
engiadina-watch = "${pkgs.findutils}/bin/find extra-src src | ${pkgs.entr}/bin/entr -s 'build-component && ${pkgs.rsync}/bin/rsync -avu dist/*.js ${cdnRoot}/'";
|
|
||||||
engiadina-edit = "$EDITOR ${cdnRoot}/index.html";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users.me = {
|
|
||||||
services.flameshot.enable = true;
|
|
||||||
|
|
||||||
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini {}).generate "flameshot.ini" {
|
|
||||||
General = {
|
|
||||||
disabledTrayIcon = true;
|
|
||||||
checkForUpdates = false;
|
|
||||||
contrastOpacity = 188;
|
|
||||||
savePath = "/tmp";
|
|
||||||
savePathFixed = true;
|
|
||||||
drawThickness = 0;
|
|
||||||
showStartupLaunchMessage = false;
|
|
||||||
filenamePattern = "shot_%F_%T";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.flameshot.Unit.Requires = lib.mkForce [];
|
|
||||||
systemd.user.services.flameshot.Environment = {
|
|
||||||
# IMGUR_CREATE_URL = "https://p.krebsco.de/image";
|
|
||||||
# IMGUR_DELETE_URL = "https://p.krebsco.de/image/delete/%1";
|
|
||||||
PATH = "${config.home-manager.users.me.home.profileDirectory}/bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
flixLocation = "/media/flix";
|
|
||||||
cacheLocation = "/var/cache/flix";
|
|
||||||
indexFilename = "index";
|
|
||||||
flixUser = "flix";
|
|
||||||
flixGroup = "users";
|
|
||||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
|
||||||
in {
|
|
||||||
fileSystems.${flixLocation} = {
|
|
||||||
device = "prism.r:/export";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
|
||||||
"noauto"
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"x-systemd.automount"
|
|
||||||
"x-systemd.device-timeout=1"
|
|
||||||
"x-systemd.idle-timeout=1min"
|
|
||||||
"x-systemd.requires=tinc.retiolum.service"
|
|
||||||
"x-systemd.requires=wpa_supplicant.service"
|
|
||||||
"user"
|
|
||||||
"_netdev"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
(tmpfilesConfig {
|
|
||||||
type = "d";
|
|
||||||
path = cacheLocation;
|
|
||||||
mode = "0750";
|
|
||||||
user = flixUser;
|
|
||||||
group = flixGroup;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.flix-index = {
|
|
||||||
description = "Flix indexing service";
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
script = "cp ${flixLocation}/download/index ./${indexFilename}";
|
|
||||||
startAt = "hourly";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = flixUser;
|
|
||||||
Group = flixGroup;
|
|
||||||
WorkingDirectory = cacheLocation;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.extraUsers.${flixUser} = {
|
|
||||||
isSystemUser = true;
|
|
||||||
createHome = true;
|
|
||||||
home = cacheLocation;
|
|
||||||
extraGroups = [ flixGroup ];
|
|
||||||
};
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
|
||||||
|
|
||||||
${pkgs.dmenu}/bin/dmenu -i -p flix -l 5 "$@" < ${cacheLocation}/${indexFilename} \
|
|
||||||
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.utillinux}/bin/setsid ${pkgs.xdg_utils}/bin/xdg-open '{}'
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,39 +1,19 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
{
|
||||||
|
niveum.fonts = {
|
||||||
|
ui = {
|
||||||
|
name = "Sans";
|
||||||
|
size = 9;
|
||||||
|
};
|
||||||
|
terminal = {
|
||||||
|
name = "Monospace";
|
||||||
|
size = 9;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultFonts = true;
|
enableDefaultFonts = true;
|
||||||
fontDir.enable = true;
|
enableFontDir = true;
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [ corefonts eb-garamond fira libertine lmodern noto-fonts roboto ubuntu_font_family ];
|
||||||
corefonts
|
|
||||||
eb-garamond
|
|
||||||
fira
|
|
||||||
font-awesome-ttf
|
|
||||||
ibm-plex
|
|
||||||
inconsolata
|
|
||||||
iosevka
|
|
||||||
libertine
|
|
||||||
lmodern
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
roboto
|
|
||||||
roboto-mono
|
|
||||||
roboto-slab
|
|
||||||
source-code-pro
|
|
||||||
source-serif-pro
|
|
||||||
source-sans-pro
|
|
||||||
ubuntu_font_family
|
|
||||||
gfs-fonts
|
|
||||||
jetbrains-mono
|
|
||||||
twemoji-color-font
|
|
||||||
joypixels
|
|
||||||
];
|
|
||||||
fontconfig.defaultFonts = {
|
|
||||||
monospace = [ "JetBrains Mono" ];
|
|
||||||
serif = [ "Roboto Slab" ];
|
|
||||||
sansSerif = [ "Roboto" "Noto Sans" ];
|
|
||||||
emoji = [ "JoyPixels" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
{ pkgs, lib, ... }: {
|
|
||||||
environment = {
|
|
||||||
systemPackages = [ pkgs.fzf ];
|
|
||||||
variables = {
|
|
||||||
FZF_DEFAULT_OPTS =
|
|
||||||
lib.escapeShellArgs [ "--height=40%" "--layout=reverse" ];
|
|
||||||
FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d";
|
|
||||||
FZF_ALT_C_OPTS = lib.escapeShellArgs [
|
|
||||||
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
|
|
||||||
"--bind=space:toggle-preview"
|
|
||||||
"--preview-window=hidden"
|
|
||||||
];
|
|
||||||
FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f";
|
|
||||||
FZF_CTRL_T_OPTS =
|
|
||||||
lib.escapeShellArgs [ "--preview='${pkgs.bat}/bin/bat \"{}\"'" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh.interactiveShellInit = ''
|
|
||||||
if [[ $options[zle] = on ]]; then
|
|
||||||
. ${pkgs.fzf}/share/fzf/completion.zsh
|
|
||||||
. ${pkgs.fzf}/share/fzf/key-bindings.zsh
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
|
||||||
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
|
||||||
. ${pkgs.fzf}/share/fzf/completion.bash
|
|
||||||
. ${pkgs.fzf}/share/fzf/key-bindings.bash
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writers.writeDashBin "gaslight-stream" ''
|
|
||||||
${pkgs.ffmpeg}/bin/ffmpeg -r 14 -s 640x480 -f video4linux2 -i /dev/video0 -f alsa -i default -c:v libx264 -preset ultrafast -c:a aac -f avi -
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writeDashBin "gaslight-say" ''
|
|
||||||
voices="de
|
|
||||||
de+whisper"
|
|
||||||
|
|
||||||
echo "$@" | ${pkgs.espeak}/bin/espeak -v "$(echo "$voices" | ${pkgs.coreutils}/bin/shuf -n1)"
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writeDashBin "gaslight-play" ''
|
|
||||||
set -o noglob
|
|
||||||
${pkgs.mpv}/bin/mpv --no-video "$1"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
ssh machine gaslight-stream | mpv -
|
|
||||||
ssh machine gaslight-say "blablabla"
|
|
||||||
|
|
||||||
*/
|
|
||||||
@@ -1,64 +1,25 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) kieran ignorePaths;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.mr
|
pkgs.mr
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.gitAndTools.gitflow
|
|
||||||
pkgs.gitAndTools.hub
|
pkgs.gitAndTools.hub
|
||||||
pkgs.gitAndTools.gh
|
|
||||||
pkgs.gitAndTools.git-extras
|
pkgs.gitAndTools.git-extras
|
||||||
pkgs.gitAndTools.git-trim
|
|
||||||
pkgs.gitstats
|
pkgs.gitstats
|
||||||
pkgs.patch
|
pkgs.patch
|
||||||
pkgs.patchutils
|
pkgs.patchutils
|
||||||
|
pkgs.git-quick-stats
|
||||||
pkgs.git-preview
|
pkgs.git-preview
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.shellAliases = {
|
|
||||||
gf = "git-flow";
|
|
||||||
g = "git";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
home.file.".mrconfig".text = let
|
home.file.".mrconfig".text = builtins.readFile <dot/mrconfig.ini>;
|
||||||
prependPath = prefix:
|
|
||||||
lib.attrsets.mapAttrs'
|
|
||||||
(path: lib.attrsets.nameValuePair "${prefix}/${path}");
|
|
||||||
git = url: { checkout = "git clone ${url}"; };
|
|
||||||
github = owner: repo: git "git@github.com:${owner}/${repo}";
|
|
||||||
keybase = owner: repo: git "keybase://private/${owner}/${repo}";
|
|
||||||
in lib.generators.toINI { } ({
|
|
||||||
DEFAULT = { git_gc = ''git gc "$@"''; };
|
|
||||||
} // prependPath "projects" {
|
|
||||||
"menstruation.rs" = github "kmein" "menstruation.rs";
|
|
||||||
brockman = github "kmein" "brockman";
|
|
||||||
challenges = github "kmein" "challenges";
|
|
||||||
conlangs = github "kmein" "conlangs";
|
|
||||||
ledger = keybase "kmein" "ledger";
|
|
||||||
mahlzeit = github "kmein" "mahlzeit";
|
|
||||||
menstruation-telegram = github "kmein" "menstruation-telegram";
|
|
||||||
meteora = github "kmein" "meteora";
|
|
||||||
modernizr = github "kmein" "modernizr";
|
|
||||||
niveum = github "kmein" "niveum";
|
|
||||||
nixpkgs = github "NixOS" "nixpkgs";
|
|
||||||
poetry = github "kmein" "poetry";
|
|
||||||
quotes = github "kmein" "quotes";
|
|
||||||
sphinx = github "kmein" "sphinx";
|
|
||||||
stockholm = git "https://cgit.krebsco.de/stockholm";
|
|
||||||
telebots = github "kmein" "telebots";
|
|
||||||
traadfri = github "kmein" "traadfri";
|
|
||||||
wissen = github "kmein" "wissen";
|
|
||||||
zen = github "kmein" "zen";
|
|
||||||
});
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
userName = kieran.name;
|
userName = config.niveum.user.name;
|
||||||
userEmail = kieran.email;
|
userEmail = config.niveum.user.email;
|
||||||
aliases = {
|
aliases = {
|
||||||
br = "branch";
|
br = "branch";
|
||||||
co = "checkout";
|
co = "checkout";
|
||||||
@@ -70,34 +31,9 @@ in
|
|||||||
diffs = "diff --staged";
|
diffs = "diff --staged";
|
||||||
last = "log -1 HEAD";
|
last = "log -1 HEAD";
|
||||||
logs = "log --pretty=oneline";
|
logs = "log --pretty=oneline";
|
||||||
graph =
|
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";
|
||||||
"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 = 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 = {
|
|
||||||
ui = true;
|
|
||||||
diff = {
|
|
||||||
meta = "11";
|
|
||||||
frag = "magenta bold";
|
|
||||||
commit = "yellow bold";
|
|
||||||
old = "red bold";
|
|
||||||
new = "green bold";
|
|
||||||
whitespace = "red reverse";
|
|
||||||
};
|
|
||||||
diff-highlight = {
|
|
||||||
oldNormal = "red bold";
|
|
||||||
oldHighlight = "red bold 52";
|
|
||||||
newNormal = "green bold";
|
|
||||||
newHighlight = "green bold 22";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
ignores = config.niveum.ignore;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
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;";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
5
configs/gollum.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
services.gollum = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
46
configs/haskell/default.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.me.home.file = {
|
||||||
|
".ghc/ghci.conf".text = ''
|
||||||
|
:set editor vim
|
||||||
|
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
||||||
|
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
||||||
|
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
||||||
|
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
||||||
|
:set -Wall
|
||||||
|
'';
|
||||||
|
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
||||||
|
".stack/config.yaml".text = let user = config.niveum.user; in ''
|
||||||
|
templates:
|
||||||
|
params:
|
||||||
|
author-name: ${user.name}
|
||||||
|
author-email: ${user.email}
|
||||||
|
copyright: 'Copyright: (c) 2019 ${user.name}'
|
||||||
|
github-username: ${user.github}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hoogle = {
|
||||||
|
enable = true;
|
||||||
|
packages = import ./packages.nix;
|
||||||
|
port = 8091;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
cabal2nix
|
||||||
|
stack2nix
|
||||||
|
cabal-install
|
||||||
|
hlint
|
||||||
|
# haskellPackages.brittany
|
||||||
|
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
||||||
|
] ++ map haskell.lib.justStaticExecutables [
|
||||||
|
haskellPackages.ghcid
|
||||||
|
haskellPackages.hakyll
|
||||||
|
# haskellPackages.hfmt
|
||||||
|
haskellPackages.hasktags
|
||||||
|
haskellPackages.hindent
|
||||||
|
haskellPackages.pointfree
|
||||||
|
# haskellPackages.pointful
|
||||||
|
haskellPackages.hpack
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
haskellPackages:
|
haskellPackages:
|
||||||
with haskellPackages; [
|
with haskellPackages; [
|
||||||
|
blessings
|
||||||
|
scanner
|
||||||
HTTP
|
HTTP
|
||||||
HUnit
|
HUnit
|
||||||
MissingH
|
MissingH
|
||||||
@@ -57,14 +59,13 @@ with haskellPackages; [
|
|||||||
mono-traversable
|
mono-traversable
|
||||||
mtl
|
mtl
|
||||||
network
|
network
|
||||||
|
pandoc
|
||||||
parallel
|
parallel
|
||||||
parsec
|
parsec
|
||||||
persistent
|
persistent
|
||||||
pipes
|
pipes
|
||||||
pointed
|
pointed
|
||||||
pretty
|
|
||||||
pretty-show
|
pretty-show
|
||||||
prettyprinter
|
|
||||||
primitive
|
primitive
|
||||||
process
|
process
|
||||||
profunctors
|
profunctors
|
||||||
@@ -87,9 +88,11 @@ with haskellPackages; [
|
|||||||
time
|
time
|
||||||
transformers
|
transformers
|
||||||
turtle
|
turtle
|
||||||
|
type-unary
|
||||||
unix-time
|
unix-time
|
||||||
unordered-containers
|
unordered-containers
|
||||||
vector
|
vector
|
||||||
|
vinyl
|
||||||
void
|
void
|
||||||
vty
|
vty
|
||||||
warp
|
warp
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
inherit (import ./lib.nix) triggers;
|
|
||||||
inherit (import <niveum/lib>) localAddresses;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./zigbee.nix
|
|
||||||
./frontend.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.home-assistant = {
|
|
||||||
enable = true;
|
|
||||||
configWritable = true;
|
|
||||||
lovelaceConfigWritable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
config = {
|
|
||||||
homeassistant = {
|
|
||||||
name = "Toum";
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
config = {};
|
|
||||||
discovery = {};
|
|
||||||
system_health = {};
|
|
||||||
history = {};
|
|
||||||
# tradfri.host = localAddresses.tradfri; # dont use until python3Packages.pytradfri is packaged
|
|
||||||
sun = {};
|
|
||||||
mobile_app = {};
|
|
||||||
shopping_list = {};
|
|
||||||
sensor = [
|
|
||||||
{
|
|
||||||
platform = "dwd_weather_warnings";
|
|
||||||
region_name = "Berlin";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
mqtt = {
|
|
||||||
broker = "localhost";
|
|
||||||
port = 1883;
|
|
||||||
client_id = "home-assistant";
|
|
||||||
username = "albrecht";
|
|
||||||
password = lib.strings.fileContents <system-secrets/mosquitto>;
|
|
||||||
keepalive = 60;
|
|
||||||
protocol = "3.1";
|
|
||||||
|
|
||||||
discovery = true;
|
|
||||||
birth_message = {
|
|
||||||
topic = "/hass/status";
|
|
||||||
payload = "online";
|
|
||||||
};
|
|
||||||
will_message = {
|
|
||||||
topic = "/hass/status";
|
|
||||||
payload = "offline";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
let
|
|
||||||
inherit (import ./lib.nix) triggers;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.home-assistant.config = {
|
|
||||||
frontend = {
|
|
||||||
themes = {
|
|
||||||
day_theme = import ./themes/clear.nix;
|
|
||||||
night_theme = import ./themes/clear-dark.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
automation = [
|
|
||||||
{
|
|
||||||
alias = "Night Theme";
|
|
||||||
hide_entity = true;
|
|
||||||
trigger = triggers.night;
|
|
||||||
action = [
|
|
||||||
{
|
|
||||||
service = "frontend.set_theme";
|
|
||||||
data.name = "night_theme";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
alias = "Day Theme";
|
|
||||||
hide_entity = true;
|
|
||||||
trigger = triggers.day;
|
|
||||||
action = [
|
|
||||||
{
|
|
||||||
service = "frontend.set_theme";
|
|
||||||
data.name = "day_theme";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
triggers = {
|
|
||||||
night = {
|
|
||||||
platform = "numeric_state";
|
|
||||||
entity_id = "sun.sun";
|
|
||||||
value_template = "{{ state.attributes.elevation }}";
|
|
||||||
below = -4.0;
|
|
||||||
};
|
|
||||||
day = {
|
|
||||||
platform = "numeric_state";
|
|
||||||
entity_id = "sun.sun";
|
|
||||||
value_template = "{{ state.attributes.elevation }}";
|
|
||||||
above = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
rec {
|
|
||||||
# Colors
|
|
||||||
text-color = "#DADADB"; # Grey text
|
|
||||||
text-medium-light-color = "#A0A2A8"; # Medium-light grey text
|
|
||||||
text-medium-color = "#80828A"; # Medium grey text
|
|
||||||
text-dark-color = "#6A6B74"; # Dark grey text
|
|
||||||
accent-color = "#008bef"; # Blue
|
|
||||||
accent-medium-color = "#2484C9"; # Decent blue
|
|
||||||
background-color = "#3b4049"; # Dark grey background
|
|
||||||
background-color-2 = "#484E59"; # Light grey background
|
|
||||||
background-card-color = "#434952"; # Grey background
|
|
||||||
border-color = "#383C46"; # Grey border
|
|
||||||
|
|
||||||
# Header
|
|
||||||
app-header-background-color = "#363941"; # Background color
|
|
||||||
|
|
||||||
# Text
|
|
||||||
primary-color = text-color;
|
|
||||||
text-primary-color = text-color;
|
|
||||||
|
|
||||||
# Left Menu
|
|
||||||
paper-listbox-background-color = background-color; # Background
|
|
||||||
sidebar-icon-color = text-medium-color; # icons
|
|
||||||
sidebar-selected-icon-color = text-medium-light-color; # Selected row icon and background (15%)
|
|
||||||
sidebar-selected-text-color = text-color; # Selected row label
|
|
||||||
|
|
||||||
# UI
|
|
||||||
paper-card-header-color = text-color; # Title in settings
|
|
||||||
primary-background-color = background-color; # Background (also title background in left menu)
|
|
||||||
mdc-theme-primary = accent-medium-color; # Action Buttons (save, restart etc.)
|
|
||||||
card-background-color = background-card-color; # Entity Registry Background
|
|
||||||
|
|
||||||
# Card
|
|
||||||
paper-card-background-color = background-card-color; # Background
|
|
||||||
dark-primary-color = text-color;
|
|
||||||
primary-text-color = text-color;
|
|
||||||
paper-listbox-color = text-color;
|
|
||||||
light-primary-color = text-dark-color;
|
|
||||||
secondary-text-color = text-medium-color;
|
|
||||||
disabled-text-color = text-dark-color;
|
|
||||||
paper-dialog-button-color = text-color;
|
|
||||||
secondary-background-color = background-color-2; # Background more info title
|
|
||||||
|
|
||||||
# Icons
|
|
||||||
paper-item-icon-color = text-dark-color; # Off
|
|
||||||
paper-item-icon-active-color = accent-color; # On
|
|
||||||
|
|
||||||
# Switches
|
|
||||||
switch-checked-button-color = text-medium-light-color; # Knob On
|
|
||||||
switch-unchecked-button-color = text-medium-light-color; # Knob Off
|
|
||||||
switch-checked-track-color = "#009FFF"; # Background On
|
|
||||||
switch-unchecked-track-color = "#767682"; # Background Off
|
|
||||||
|
|
||||||
# Slider
|
|
||||||
paper-slider-active-color = accent-color; # Line On
|
|
||||||
paper-slider-knob-color = text-medium-light-color; # Knob On
|
|
||||||
paper-slider-container-color = text-dark-color; # Line Off
|
|
||||||
paper-slider-knob-start-color = text-medium-light-color; # Knob Off
|
|
||||||
|
|
||||||
# Badges
|
|
||||||
label-badge-text-color = text-color;
|
|
||||||
label-badge-background-color = "rgba(54, 57, 65, 0.6)";
|
|
||||||
|
|
||||||
# Shadows
|
|
||||||
ha-card-box-shadow = "inset 0px 0px 0px 1px var(--border-color)";
|
|
||||||
|
|
||||||
# HACS
|
|
||||||
hacs-badge-color = accent-color; # New Badge
|
|
||||||
hacs-status-installed = text-color; # Installed Icon
|
|
||||||
hacs-status-pending-restart = text-dark-color; # Restart Icon
|
|
||||||
hacs-status-pending-update = accent-color;
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
rec {
|
|
||||||
text-color = "#636B75"; # Grey text
|
|
||||||
text-medium-color = "#8c96a5"; # Medium grey text
|
|
||||||
text-light-color = "#BAC0C6"; # Light grey text
|
|
||||||
accent-color = "#00a1ff"; # Blue
|
|
||||||
background-color = "#F7F8F9"; # Light grey background
|
|
||||||
background-color-2 = "#F4F5F6"; # Light grey background
|
|
||||||
background-card-color = "rgba(255,255,255,1.0)"; # White background
|
|
||||||
border-color = "#E8E8E8"; # Light grey border
|
|
||||||
|
|
||||||
# Header
|
|
||||||
primary-color = text-color; # Background
|
|
||||||
text-primary-color = "#FFF"; # Text
|
|
||||||
|
|
||||||
# Left Menu
|
|
||||||
paper-listbox-background-color = background-color; # Background
|
|
||||||
# TODO = Text and Icons
|
|
||||||
|
|
||||||
# UI
|
|
||||||
paper-card-header-color = text-color; # Title in settings
|
|
||||||
primary-background-color = background-color; # Background color (also title background in left menu)
|
|
||||||
|
|
||||||
# Card
|
|
||||||
paper-card-background-color = background-card-color; # Background
|
|
||||||
dark-primary-color = text-color;
|
|
||||||
primary-text-color = text-color;
|
|
||||||
paper-listbox-color = text-color;
|
|
||||||
light-primary-color = text-light-color;
|
|
||||||
secondary-text-color = text-medium-color;
|
|
||||||
disabled-text-color = text-light-color;
|
|
||||||
paper-dialog-button-color = text-color;
|
|
||||||
secondary-background-color = background-color-2; # Background more info title
|
|
||||||
|
|
||||||
# Icons
|
|
||||||
paper-item-icon-color = text-light-color; # Off
|
|
||||||
paper-item-icon-active-color = accent-color; # On
|
|
||||||
|
|
||||||
# Switches
|
|
||||||
switch-checked-button-color = "#FFF"; # Knob On
|
|
||||||
switch-unchecked-button-color = "#FFF"; # Knob Off
|
|
||||||
switch-checked-track-color = "#0077FF"; # Background On
|
|
||||||
switch-unchecked-track-color = disabled-text-color; # Background Off
|
|
||||||
|
|
||||||
# Slider
|
|
||||||
paper-slider-active-color = accent-color; # Line On
|
|
||||||
paper-slider-container-color = "#e5e7ea"; # Line Off
|
|
||||||
paper-slider-knob-color = text-light-color; # Knob On
|
|
||||||
paper-slider-knob-start-color = text-light-color; # Knob Off
|
|
||||||
|
|
||||||
# Shadows
|
|
||||||
ha-card-box-shadow = "inset 0px 0px 0px 1px var(--border-color)";
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) localAddresses;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.zigbee2mqtt = {
|
|
||||||
enable = true;
|
|
||||||
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 = {
|
|
||||||
enable = true;
|
|
||||||
host = "0.0.0.0";
|
|
||||||
allowAnonymous = false;
|
|
||||||
checkPasswords = true;
|
|
||||||
users."albrecht" = {
|
|
||||||
password = lib.strings.fileContents <system-secrets/mosquitto>;
|
|
||||||
acl = [ "topic readwrite #" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.mosquitto ];
|
|
||||||
|
|
||||||
services.home-assistant = {
|
|
||||||
config = {
|
|
||||||
switch = [
|
|
||||||
{
|
|
||||||
platform = "mqtt";
|
|
||||||
name = "zigbee2mqtt_join";
|
|
||||||
state_topic = "/zigbee2mqtt/bridge/config/permit_join";
|
|
||||||
command_topic = "/zigbee2mqtt/bridge/config/permit_join";
|
|
||||||
payload_on = "true";
|
|
||||||
payload_off = "false";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
timer.zigbee_permit_join = {
|
|
||||||
name = "Zigbee Time remaining";
|
|
||||||
duration = 120;
|
|
||||||
};
|
|
||||||
automation = [
|
|
||||||
# Automation to start timer when enable join is turned on
|
|
||||||
{
|
|
||||||
id = "zigbee_join_enabled";
|
|
||||||
alias = "";
|
|
||||||
hide_entity = "true";
|
|
||||||
trigger = {
|
|
||||||
platform = "state";
|
|
||||||
entity_id = "switch.zigbee2mqtt_join";
|
|
||||||
to = "on";
|
|
||||||
};
|
|
||||||
action = {
|
|
||||||
service = "timer.start";
|
|
||||||
entity_id = "timer.zigbee_permit_join";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
# Automation to stop timer when switch turned off and turn off switch when timer finished
|
|
||||||
{
|
|
||||||
id = "zigbee_join_disabled";
|
|
||||||
hide_entity = "true";
|
|
||||||
trigger = [
|
|
||||||
{
|
|
||||||
platform = "event";
|
|
||||||
event_type = "timer.finished";
|
|
||||||
event_data.entity_id = "timer.zigbee_permit_join";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
platform = "state";
|
|
||||||
entity_id = "switch.zigbee2mqtt_join";
|
|
||||||
to = "off";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
action = [
|
|
||||||
{
|
|
||||||
service = "timer.cancel";
|
|
||||||
data.entity_id = "timer.zigbee_permit_join";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
service = "switch.turn_off";
|
|
||||||
entity_id = "switch.zigbee2mqtt_join";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
backupLocation = "/var/lib/codimd-backup";
|
|
||||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <stockholm/krebs/3modules/permown.nix> ];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."pad.xn--kiern-0qa.de" = {
|
|
||||||
enableACME = true;
|
|
||||||
addSSL = true;
|
|
||||||
locations."/".extraConfig = ''
|
|
||||||
client_max_body_size 4G;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_pass http://localhost:3091;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hedgedoc = {
|
|
||||||
enable = true;
|
|
||||||
configuration = {
|
|
||||||
allowAnonymous = true;
|
|
||||||
allowGravatar = false;
|
|
||||||
allowFreeURL = true;
|
|
||||||
db = {
|
|
||||||
dialect = "sqlite";
|
|
||||||
storage = stateLocation;
|
|
||||||
};
|
|
||||||
port = 3091;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
krebs.permown.${backupLocation} = { owner = "codimd"; group = "codimd"; umask = "0002"; };
|
|
||||||
|
|
||||||
systemd.services.hedgedoc-backup = {
|
|
||||||
description = "Hedgedoc backup service";
|
|
||||||
script = ''
|
|
||||||
${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
|
|
||||||
| ${pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
|
|
||||||
import json
|
|
||||||
import pathlib
|
|
||||||
import sys
|
|
||||||
|
|
||||||
for note in json.load(sys.stdin):
|
|
||||||
user_directory = pathlib.Path()
|
|
||||||
if note["ownerId"]:
|
|
||||||
user_directory = pathlib.Path(note["ownerId"])
|
|
||||||
user_directory.mkdir(exist_ok=True)
|
|
||||||
file_path = user_directory / (
|
|
||||||
(note["alias"] if note["alias"] else note["shortid"]) + ".md"
|
|
||||||
)
|
|
||||||
file_path.write_text(note["content"])
|
|
||||||
print(f"✔ {file_path}", file=sys.stderr)
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
startAt = "hourly";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
User = "codimd";
|
|
||||||
Group = "codimd";
|
|
||||||
WorkingDirectory = backupLocation;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }:
|
||||||
imports = [ <niveum/modules/hledger.nix> ];
|
{
|
||||||
|
imports = [ <modules/hledger.nix> ];
|
||||||
|
|
||||||
niveum.hledger = {
|
niveum.hledger = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ledgerFile = "$HOME/projects/ledger/all.journal";
|
ledgerFile = "$HOME/prog/git/ledger/current.journal";
|
||||||
server = {
|
server = {
|
||||||
enable = false;
|
enable = false;
|
||||||
user = config.users.users.me;
|
user = config.users.users.me;
|
||||||
package = pkgs.hledger-web;
|
package = pkgs.unstable.hledger-web;
|
||||||
};
|
};
|
||||||
package = pkgs.hledger;
|
package = pkgs.unstable.hledger;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
7
configs/home-assistant.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
services.home-assistant = {
|
||||||
|
enable = true;
|
||||||
|
configWritable = true;
|
||||||
|
lovelaceConfigWritable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -2,28 +2,33 @@
|
|||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
programs.htop = {
|
programs.htop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
colorScheme = 0;
|
||||||
color_scheme = 0;
|
accountGuestInCpuMeter = true;
|
||||||
account_guest_in_cpu_meter = true;
|
cpuCountFromZero = false;
|
||||||
cpu_count_from_zero = false;
|
delay = 15;
|
||||||
delay = 15;
|
detailedCpuTime = false;
|
||||||
detailed_cpu_time = false;
|
headerMargin = true;
|
||||||
header_margin = true;
|
hideKernelThreads = true;
|
||||||
hide_kernel_threads = true;
|
hideThreads = false;
|
||||||
hide_threads = true;
|
hideUserlandThreads = false;
|
||||||
hide_userland_threads = true;
|
highlightBaseName = true;
|
||||||
highlight_base_name = true;
|
highlightMegabytes = true;
|
||||||
highlight_megabytes = true;
|
highlightThreads = true;
|
||||||
highlight_threads = true;
|
shadowOtherUsers = true;
|
||||||
shadow_other_users = true;
|
showProgramPath = false;
|
||||||
show_program_path = false;
|
showThreadNames = true;
|
||||||
show_thread_names = false;
|
sortDescending = true;
|
||||||
sort_descending = true;
|
sortKey = "PERCENT_CPU";
|
||||||
sort_key = "PERCENT_CPU";
|
treeView = true;
|
||||||
tree_view = true;
|
updateProcessNames = false;
|
||||||
update_process_names = false;
|
meters = {
|
||||||
right_meters = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
|
left = [
|
||||||
left_meters = [ "LeftCPUs2" "RightCPUs2" "Memory" "Swap" ];
|
{ kind = "LeftCPUs2"; mode = 1; }
|
||||||
|
{ kind = "RightCPUs2"; mode = 1; }
|
||||||
|
{ kind = "Memory"; mode = 1; }
|
||||||
|
{ kind = "Swap"; mode = 1; }
|
||||||
|
];
|
||||||
|
right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.strings) fileContents;
|
|
||||||
inherit (import <niveum/lib>) sshPort;
|
|
||||||
eduroam = {
|
eduroam = {
|
||||||
identity = fileContents <secrets/eduroam/identity>;
|
identity = lib.strings.removeSuffix "\n" (builtins.readFile <shared-secrets/eduroam/identity>);
|
||||||
password = fileContents <secrets/eduroam/password>;
|
password = lib.strings.removeSuffix "\n" (builtins.readFile <shared-secrets/eduroam/password>);
|
||||||
};
|
};
|
||||||
eduroamAuth = ''
|
eduroamAuth = ''
|
||||||
key_mgmt=WPA-EAP
|
key_mgmt=WPA-EAP
|
||||||
@@ -14,79 +12,32 @@ let
|
|||||||
anonymous_identity="anonymous@wlan.hu-berlin.de"
|
anonymous_identity="anonymous@wlan.hu-berlin.de"
|
||||||
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
|
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
|
||||||
password="${eduroam.password}"
|
password="${eduroam.password}"
|
||||||
ca_cert="${
|
ca_cert="${pkgs.fetchurl {
|
||||||
pkgs.fetchurl {
|
url = https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem;
|
||||||
url =
|
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
||||||
"https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
|
}}"
|
||||||
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
phase2="auth=PAP"
|
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 {
|
in {
|
||||||
networking.wireless.networks = {
|
networking.wireless.networks = {
|
||||||
eduroam_5GHz.auth = eduroamAuth;
|
eduroam_5GHz.auth = eduroamAuth;
|
||||||
eduroam.auth = eduroamAuth;
|
eduroam.auth = eduroamAuth;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/media/hu-berlin/germpro2" = {
|
services.openvpn.servers = {
|
||||||
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
|
hu-berlin = {
|
||||||
fsType = "cifs";
|
config = ''
|
||||||
options = hu-berlin-cifs-options;
|
config ${pkgs.fetchurl {
|
||||||
};
|
url = https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn;
|
||||||
|
sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h";
|
||||||
fileSystems."/media/hu-berlin/germhome" = {
|
}}
|
||||||
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
|
# route-nopull
|
||||||
fsType = "cifs";
|
# route 141.20.0.0 255.255.0.0
|
||||||
options = hu-berlin-cifs-options;
|
'';
|
||||||
};
|
authUserPass = {
|
||||||
|
username = eduroam.identity;
|
||||||
environment.systemPackages = [
|
password = eduroam.password;
|
||||||
(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 = {
|
|
||||||
username = eduroam.identity;
|
|
||||||
password = eduroam.password;
|
|
||||||
};
|
};
|
||||||
config = fileContents (pkgs.fetchurl {
|
|
||||||
url =
|
|
||||||
"https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn";
|
|
||||||
sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h";
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
330
configs/i3.nix
@@ -1,137 +1,56 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (import <niveum/lib>) defaultApplications colours;
|
new-workspace = pkgs.unstable.writers.writeDash "new-workspace" ''
|
||||||
klem = import <niveum/packages/scripts/klem.nix> {
|
|
||||||
inherit pkgs lib;
|
|
||||||
config.scripts = {
|
|
||||||
"p.r" = pkgs.writers.writeDash "p.r" ''
|
|
||||||
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
|
||||||
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
|
||||||
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
|
|
||||||
'';
|
|
||||||
"ix.io" = pkgs.writers.writeDash "ix.io" ''
|
|
||||||
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
|
|
||||||
'';
|
|
||||||
"go.r" = pkgs.writers.writeDash "go.r" ''
|
|
||||||
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
|
|
||||||
'';
|
|
||||||
"0x0.st" = pkgs.writers.writeDash "0x0.st" ''
|
|
||||||
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
|
|
||||||
'';
|
|
||||||
"rot13" = pkgs.writers.writeDash "rot13" ''
|
|
||||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
|
||||||
'';
|
|
||||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
|
||||||
${pkgs.scripts.ipa}/bin/ipa
|
|
||||||
'';
|
|
||||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
|
||||||
${pkgs.scripts.betacode}/bin/betacode
|
|
||||||
'';
|
|
||||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
|
||||||
${pkgs.scripts.devanagari}/bin/devanagari
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
|
||||||
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||||
'';
|
'';
|
||||||
move-to-new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
move-to-new-workspace = pkgs.unstable.writers.writeDash "new-workspace" ''
|
||||||
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||||
'';
|
'';
|
||||||
|
in with config.niveum; {
|
||||||
in {
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
displayManager.defaultSession = "none+i3";
|
windowManager.default = "i3";
|
||||||
windowManager.i3 = {
|
windowManager.i3.enable = true;
|
||||||
enable = true;
|
|
||||||
package = pkgs.i3-gaps;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = {
|
home-manager.users.me.xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = rec {
|
config = rec {
|
||||||
fonts = {names = ["Sans"]; size = 10.0;};
|
fonts = [ "${config.niveum.fonts.ui.name} ${toString config.niveum.fonts.ui.size}" ];
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
window = {
|
window = {
|
||||||
titlebar = false;
|
titlebar = false;
|
||||||
border = 1;
|
border = 1;
|
||||||
hideEdgeBorders = "smart";
|
hideEdgeBorders = "smart";
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
criteria = { class = "floating"; };
|
|
||||||
command = "floating enable";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = { class = "fzfmenu"; };
|
|
||||||
command = "floating enable";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = { class = "mpv"; };
|
|
||||||
command = lib.strings.concatStringsSep ", " [
|
|
||||||
"floating enable"
|
|
||||||
"sticky enable"
|
|
||||||
"fullscreen disable"
|
|
||||||
"resize set 640 480"
|
|
||||||
"move position mouse"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
gaps.inner = 4;
|
|
||||||
floating = {
|
floating = {
|
||||||
titlebar = false;
|
titlebar = false;
|
||||||
border = 1;
|
border = 1;
|
||||||
};
|
};
|
||||||
colors = let
|
colors =
|
||||||
scheme = {
|
let scheme = { background = colours.background; text = colours.foreground; };
|
||||||
background = colours.background;
|
in rec {
|
||||||
text = colours.foreground;
|
focused = scheme // {
|
||||||
|
border = colours.background;
|
||||||
|
indicator = colours.background;
|
||||||
|
childBorder = colours.background;
|
||||||
|
};
|
||||||
|
focusedInactive = focused;
|
||||||
|
unfocused = focused;
|
||||||
|
urgent = scheme // {
|
||||||
|
border = colours.red.bright;
|
||||||
|
indicator = colours.red.bright;
|
||||||
|
childBorder = colours.red.bright;
|
||||||
|
};
|
||||||
|
placeholder = scheme // {
|
||||||
|
border = colours.green.bright;
|
||||||
|
indicator = colours.green.bright;
|
||||||
|
childBorder = colours.green.bright;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in rec {
|
|
||||||
focused = scheme // {
|
|
||||||
border = colours.cyan.bright;
|
|
||||||
indicator = colours.cyan.bright;
|
|
||||||
childBorder = colours.cyan.bright;
|
|
||||||
};
|
|
||||||
unfocused = scheme // {
|
|
||||||
border = colours.background;
|
|
||||||
indicator = colours.background;
|
|
||||||
childBorder = colours.background;
|
|
||||||
};
|
|
||||||
focusedInactive = unfocused;
|
|
||||||
urgent = scheme // {
|
|
||||||
border = colours.red.bright;
|
|
||||||
indicator = colours.red.bright;
|
|
||||||
childBorder = colours.red.bright;
|
|
||||||
};
|
|
||||||
placeholder = scheme // {
|
|
||||||
border = colours.green.bright;
|
|
||||||
indicator = colours.green.bright;
|
|
||||||
childBorder = colours.green.bright;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bars = [{
|
bars = [{
|
||||||
workspaceButtons = false;
|
workspaceButtons = false;
|
||||||
fonts = {names = ["Sans"]; size = 8.0;};
|
fonts = [ "${config.niveum.fonts.terminal.name} ${toString config.niveum.fonts.terminal.size}" ];
|
||||||
mode = "hide"; # "dock"
|
mode = "hide";
|
||||||
position = "bottom";
|
|
||||||
colors = rec {
|
colors = rec {
|
||||||
background = colours.background;
|
background = colours.background;
|
||||||
separator = background;
|
separator = background;
|
||||||
@@ -142,121 +61,108 @@ in {
|
|||||||
text = colours.foreground;
|
text = colours.foreground;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
statusCommand = "${pkgs.i3status}/bin/i3status -c ${pkgs.writeText "i3status.conf" ''
|
||||||
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
general {
|
||||||
inherit (config.niveum) batteryName wirelessInterface;
|
colors = true
|
||||||
inherit colours;
|
color_good = "${colours.green.dark}"
|
||||||
inherit pkgs;
|
color_bad = "${colours.red.dark}"
|
||||||
})
|
color_degraded = "${colours.white.dark}"
|
||||||
}";
|
interval = 5
|
||||||
|
separator = " "
|
||||||
|
}
|
||||||
|
|
||||||
|
# order += "run_watch retiolum"
|
||||||
|
order += "path_exists openvpn"
|
||||||
|
order += "wireless ${networkInterfaces.wireless}"
|
||||||
|
order += "battery all"
|
||||||
|
order += "volume master"
|
||||||
|
order += "load"
|
||||||
|
order += "tztime local"
|
||||||
|
|
||||||
|
wireless ${networkInterfaces.wireless} {
|
||||||
|
format_up = "%essid"
|
||||||
|
format_down = "offline"
|
||||||
|
}
|
||||||
|
|
||||||
|
# run_watch retiolum {
|
||||||
|
# pidfile = "/var/run/tinc.retiolum.pid"
|
||||||
|
# format = "%title"
|
||||||
|
# }
|
||||||
|
|
||||||
|
path_exists openvpn {
|
||||||
|
path = "/proc/sys/net/ipv4/conf/tun0"
|
||||||
|
format = "%title"
|
||||||
|
}
|
||||||
|
|
||||||
|
battery all {
|
||||||
|
format = "%status%percentage"
|
||||||
|
format_down = "No battery"
|
||||||
|
status_chr = "↑"
|
||||||
|
status_bat = "↓"
|
||||||
|
status_unk = ""
|
||||||
|
status_full = "↯"
|
||||||
|
path = "/sys/class/power_supply/BAT%d/uevent"
|
||||||
|
low_threshold = 15
|
||||||
|
threshold_type = "percentage"
|
||||||
|
integer_battery_capacity = true
|
||||||
|
}
|
||||||
|
|
||||||
|
volume master {
|
||||||
|
format = "%volume"
|
||||||
|
format_muted = "%volume"
|
||||||
|
device = "default"
|
||||||
|
mixer = "Master"
|
||||||
|
mixer_idx = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
tztime local {
|
||||||
|
format = "%Y-%m-%d %H:%M"
|
||||||
|
}
|
||||||
|
|
||||||
|
load {
|
||||||
|
format = "%1min"
|
||||||
|
}''}";
|
||||||
}];
|
}];
|
||||||
modes.resize = {
|
|
||||||
"Escape" = ''mode "default"'';
|
|
||||||
"Return" = ''mode "default"'';
|
|
||||||
"h" = "resize shrink width 10 px or 5 ppt";
|
|
||||||
"j" = "resize grow height 10 px or 5 ppt";
|
|
||||||
"k" = "resize shrink height 10 px or 5 ppt";
|
|
||||||
"l" = "resize grow width 10 px or 5 ppt";
|
|
||||||
};
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"${modifier}+Shift+h" = "move left 25 px";
|
"${modifier}+Down" = "focus down";
|
||||||
"${modifier}+Shift+j" = "move down 25 px";
|
"${modifier}+Left" = "focus left";
|
||||||
"${modifier}+Shift+k" = "move up 25 px";
|
"${modifier}+Return" = "exec ${applications.terminal}";
|
||||||
"${modifier}+Shift+l" = "move right 25 px";
|
"${modifier}+Right" = "focus right";
|
||||||
|
"${modifier}+Shift+Down" = "move down";
|
||||||
|
"${modifier}+Shift+Left" = "move left";
|
||||||
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
"${modifier}+Shift+Up" = "move up";
|
||||||
|
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||||
|
"${modifier}+Shift+c" = "reload";
|
||||||
|
"${modifier}+Shift+n" = "move window to workspace next";
|
||||||
|
"${modifier}+Shift+q" = "kill";
|
||||||
|
"${modifier}+Shift+r" = "restart";
|
||||||
|
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||||
|
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
||||||
|
"${modifier}+Shift+z" = "floating toggle";
|
||||||
|
"${modifier}+Up" = "focus up";
|
||||||
|
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
||||||
|
"${modifier}+b" = "workspace prev";
|
||||||
|
"${modifier}+c" = "split h";
|
||||||
|
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
||||||
|
"${modifier}+e" = "layout toggle split";
|
||||||
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
"${modifier}+h" = "focus left";
|
"${modifier}+h" = "focus left";
|
||||||
"${modifier}+j" = "focus down";
|
"${modifier}+j" = "focus down";
|
||||||
"${modifier}+k" = "focus up";
|
"${modifier}+k" = "focus up";
|
||||||
"${modifier}+l" = "focus right";
|
"${modifier}+l" = "focus right";
|
||||||
|
|
||||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
|
||||||
"${modifier}+Shift+n" = "move window to workspace next";
|
|
||||||
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
|
||||||
"${modifier}+b" = "workspace prev";
|
|
||||||
"${modifier}+n" = "workspace next";
|
"${modifier}+n" = "workspace next";
|
||||||
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||||
|
|
||||||
"${modifier}+Shift+c" = "reload";
|
|
||||||
"${modifier}+Shift+q" = "kill";
|
|
||||||
"${modifier}+Shift+r" = "restart";
|
|
||||||
|
|
||||||
"${modifier}+Shift+s" = "sticky toggle";
|
|
||||||
"${modifier}+Shift+z" = "floating toggle";
|
|
||||||
"${modifier}+c" = "split h";
|
|
||||||
"${modifier}+e" = "layout toggle split";
|
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
|
||||||
"${modifier}+r" = "mode resize";
|
"${modifier}+r" = "mode resize";
|
||||||
"${modifier}+s" = "layout stacking";
|
"${modifier}+s" = "layout stacking";
|
||||||
|
"${modifier}+t" = "exec ${applications.fileManager}";
|
||||||
"${modifier}+v" = "split v";
|
"${modifier}+v" = "split v";
|
||||||
"${modifier}+w" = "layout tabbed";
|
"${modifier}+w" = "layout tabbed";
|
||||||
|
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
||||||
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
|
"${modifier}+y" = "exec ${applications.browser}";
|
||||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||||
"${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.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";
|
|
||||||
"${modifier}+Shift+d" = "exec ${
|
|
||||||
pkgs.writers.writeDash "notemenu" ''
|
|
||||||
set -efu
|
|
||||||
PATH=$PATH:${
|
|
||||||
lib.makeBinPath [ pkgs.dmenu pkgs.findutils pkgs.coreutils ]
|
|
||||||
}
|
|
||||||
|
|
||||||
cd ~/notes
|
|
||||||
note_file=$(find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2 | dmenu -i)
|
|
||||||
if test "$note_file"
|
|
||||||
then
|
|
||||||
i3-sensible-terminal -e "$EDITOR" "$note_file"
|
|
||||||
fi
|
|
||||||
''
|
|
||||||
}";
|
|
||||||
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
|
|
||||||
"${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 gui -p /tmp";
|
|
||||||
"XF86AudioLowerVolume" =
|
|
||||||
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
|
||||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||||
"XF86AudioRaiseVolume" =
|
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||||
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
|
||||||
"XF86Calculator" =
|
|
||||||
"exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
|
|
||||||
"XF86AudioPause" =
|
|
||||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause";
|
|
||||||
"XF86AudioPlay" =
|
|
||||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
|
|
||||||
"XF86AudioNext" =
|
|
||||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
|
|
||||||
"XF86AudioPrev" =
|
|
||||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
|
|
||||||
"XF86ScreenSaver" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
|
||||||
|
|
||||||
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
|
|
||||||
|
|
||||||
# key names detected with xorg.xev:
|
|
||||||
# XF86WakeUp (fn twice)
|
|
||||||
# XF86Battery (fn f3)
|
|
||||||
# XF86Sleep (fn f4) - actually suspends
|
|
||||||
# XF86WLAN
|
|
||||||
# XF86WebCam (fn f6)
|
|
||||||
# XF86TouchpadToggle (fn f8)
|
|
||||||
# XF86Suspend (fn f12) - actually suspends to disk
|
|
||||||
# Num_Lock (fn Roll) - numlocks
|
|
||||||
# XF86Audio{Prev,Next,Mute,Play,Stop}
|
|
||||||
# XF86Forward
|
|
||||||
# XF86Back
|
|
||||||
# XF86Launch1 (thinkvantage)
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPortRanges = [{
|
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
from = 1714;
|
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||||
to = 1764;
|
|
||||||
}];
|
|
||||||
allowedUDPPortRanges = [{
|
|
||||||
from = 1714;
|
|
||||||
to = 1764;
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
services.keybase.enable = true;
|
services.keybase.enable = true;
|
||||||
|
|
||||||
services.kbfs = {
|
services.kbfs = {
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
{ pkgs, lib, ... }:
|
with import <lib>;
|
||||||
let commaSep = builtins.concatStringsSep ",";
|
{
|
||||||
in {
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = commaSep [ "de" "gr" ];
|
layout = commaSep [ "de" "gr" "ru" ];
|
||||||
xkbVariant = commaSep [ "T3" "polytonic" ];
|
xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ];
|
||||||
xkbOptions =
|
xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
|
||||||
commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
console.keyMap = "de";
|
i18n.consoleKeyMap = "de";
|
||||||
|
|
||||||
# improve held key rate
|
|
||||||
services.xserver.displayManager.sessionCommands =
|
|
||||||
"${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
|
||||||
}
|
}
|
||||||
|
|||||||
123
configs/khal.nix
@@ -1,123 +0,0 @@
|
|||||||
{ 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}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
let ssid = "Kleiter Gast";
|
|
||||||
in {
|
|
||||||
networking.wireless.networks.${ssid}.psk = "Kleiter-Gast";
|
|
||||||
|
|
||||||
# fix dns
|
|
||||||
systemd.network.networks.kleiter = {
|
|
||||||
dns = [ "8.8.8.8" "8.8.4.4" ];
|
|
||||||
networkConfig.DHCP = "yes";
|
|
||||||
matchConfig.Name = "wlp3s0";
|
|
||||||
matchConfig.SSID = ssid;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
58
configs/mail.nix
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.notmuch
|
||||||
|
pkgs.offlineimap
|
||||||
|
pkgs.msmtp
|
||||||
|
pkgs.neomutt
|
||||||
|
];
|
||||||
|
home-manager.users.me = {
|
||||||
|
programs.astroid = {
|
||||||
|
enable = true;
|
||||||
|
externalEditor = "urxvt -embed %3 -e nvim %1";
|
||||||
|
pollScript = "offlineimap";
|
||||||
|
};
|
||||||
|
|
||||||
|
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
|
||||||
|
|
||||||
|
accounts.email.accounts.amroplay = {
|
||||||
|
astroid.enable = true;
|
||||||
|
address = "amroplay@gmail.com";
|
||||||
|
userName = "amroplay";
|
||||||
|
flavor = "gmail.com";
|
||||||
|
realName = config.niveum.user.name;
|
||||||
|
msmtp.enable = true;
|
||||||
|
notmuch.enable = true;
|
||||||
|
offlineimap = {
|
||||||
|
enable = true;
|
||||||
|
postSyncHookCommand = "notmuch new";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
accounts.email.accounts.hu-berlin = {
|
||||||
|
astroid.enable = true;
|
||||||
|
address = "meinhark@hu-berlin.de";
|
||||||
|
userName = "meinhark";
|
||||||
|
realName = config.niveum.user.name;
|
||||||
|
imap = {
|
||||||
|
host = "mailbox.cms.hu-berlin.de";
|
||||||
|
port = 993;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
smtp = {
|
||||||
|
host = "mailhost.cms.hu-berlin.de";
|
||||||
|
port = 25;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
msmtp.enable = true;
|
||||||
|
notmuch.enable = true;
|
||||||
|
offlineimap = {
|
||||||
|
enable = true;
|
||||||
|
postSyncHookCommand = "notmuch new";
|
||||||
|
};
|
||||||
|
primary = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.offlineimap.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) email-sshKey;
|
|
||||||
much =
|
|
||||||
let
|
|
||||||
nixpkgs-much = import (pkgs.fetchFromGitHub {
|
|
||||||
owner = "NixOS";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
rev = "7c2a362b58a1c2ba72d24aa3869da3b1a91d39e1";
|
|
||||||
sha256 = "0gl4xndyahasa9dv5mi3x9w8s457wl2xh9lcldizcn1irjvkrzs4";
|
|
||||||
}) {
|
|
||||||
overlays = [
|
|
||||||
(import <stockholm/krebs/5pkgs/haskell>)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
much-pkg = pkgs.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
|
|
||||||
in nixpkgs-much.haskell.lib.dontHaddock much-pkg;
|
|
||||||
in {
|
|
||||||
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
|
|
||||||
|
|
||||||
users.users.me.openssh.authorizedKeys.keys = [ email-sshKey ];
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.notmuch-addrlookup
|
|
||||||
|
|
||||||
pkgs.muchsync
|
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "mua" ''
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
${much}/bin/much-kmein
|
|
||||||
else
|
|
||||||
${much}/bin/much-kmein -q "$*"
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "mail-clean" ''
|
|
||||||
${pkgs.notmuch}/bin/notmuch search --output files --format=text0 tag:deleted | ${pkgs.findutils}/bin/xargs -r0 rm
|
|
||||||
${pkgs.notmuch}/bin/notmuch new
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
programs.notmuch = {
|
|
||||||
enable = true;
|
|
||||||
search.excludeTags = [ "deleted" "spam" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.msmtp.enable = true;
|
|
||||||
|
|
||||||
accounts.email.accounts = import ./accounts.nix { inherit lib; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: {
|
|
||||||
matterbridge = (import (super.fetchFromGitHub {
|
|
||||||
owner = "NixOS";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
rev = "e45d91ee65db293a172ec506759d1248e40c35f5";
|
|
||||||
sha256 = "03cjs5xcx09lw0djyrx2kfakw7gkg4iqmy9w25azai62im39l30k";
|
|
||||||
}) {}).matterbridge;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
services.matterbridge = {
|
|
||||||
enable = true;
|
|
||||||
configPath =
|
|
||||||
let bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
|
||||||
in toString ((pkgs.formats.toml {}).generate "config.toml" {
|
|
||||||
general = {
|
|
||||||
RemoteNickFormat = "[{NICK}] ";
|
|
||||||
Charset = "utf-8";
|
|
||||||
};
|
|
||||||
telegram.kmein.Token = bridgeBotToken;
|
|
||||||
irc =
|
|
||||||
let Nick = "ponte"; StripMarkdown = true;
|
|
||||||
in {
|
|
||||||
hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick StripMarkdown; };
|
|
||||||
};
|
|
||||||
mumble.lassulus = {
|
|
||||||
Server = "lassul.us:64738";
|
|
||||||
Nick = "krebs_bridge";
|
|
||||||
SkipTLSVerify = true;
|
|
||||||
};
|
|
||||||
gateway = [
|
|
||||||
{
|
|
||||||
name = "krebs-bridge";
|
|
||||||
enable = true;
|
|
||||||
inout = [
|
|
||||||
{
|
|
||||||
account = "irc.hackint";
|
|
||||||
channel = "#krebs";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
account = "telegram.kmein";
|
|
||||||
channel = "-330372458";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
account = "mumble.lassulus";
|
|
||||||
channel = 6; # "nixos"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
home-manager.users.me = {
|
|
||||||
xdg.mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
defaultApplications = {
|
|
||||||
"application/epub+zip" = "org.pwmt.zathura.desktop";
|
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
|
||||||
"application/vnd.oasis.opendocument.text" = "writer.desktop";
|
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "writer.desktop";
|
|
||||||
"image/jpeg" = "sxiv.desktop";
|
|
||||||
"image/png" = "sxiv.desktop";
|
|
||||||
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
|
|
||||||
"text/html" = "brave-browser.desktop";
|
|
||||||
"text/markdown" = "nvim.desktop";
|
|
||||||
"text/plain" = "nvim.desktop";
|
|
||||||
"x-scheme-handler/about" = "brave-browser.desktop";
|
|
||||||
"x-scheme-handler/http" = "brave-browser.desktop";
|
|
||||||
"x-scheme-handler/https" = "brave-browser.desktop";
|
|
||||||
"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";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // {
|
|
||||||
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <niveum/modules/moodle-dl.nix> ];
|
|
||||||
|
|
||||||
services.moodle-dl = {
|
|
||||||
enable = true;
|
|
||||||
startAt = "hourly";
|
|
||||||
package = moodle-dl-package;
|
|
||||||
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 = "/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
moodle-dl-package = pkgs.moodle-dl.overrideAttrs (old: old // {
|
|
||||||
patches = [ <niveum/packages/moodle-dl/telegram-format.patch> ];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <niveum/modules/moodle-dl.nix> ];
|
|
||||||
|
|
||||||
services.moodle-dl = {
|
|
||||||
enable = true;
|
|
||||||
startAt = "hourly";
|
|
||||||
package = moodle-dl-package;
|
|
||||||
settings = {
|
|
||||||
telegram = {
|
|
||||||
token = lib.strings.fileContents <system-secrets/telegram/moodle-dl.token>;
|
|
||||||
chat_id = "18980945";
|
|
||||||
send_error_msg = false;
|
|
||||||
};
|
|
||||||
token = lib.strings.fileContents <system-secrets/moodle.token>;
|
|
||||||
moodle_domain = "moodle.hu-berlin.de";
|
|
||||||
moodle_path = "/";
|
|
||||||
download_course_ids = [
|
|
||||||
# WS 2020
|
|
||||||
99881 # Dialektologie
|
|
||||||
100183 # Onomastik
|
|
||||||
100353 # Sanskrit I
|
|
||||||
100692 # Sanskrit Tutorium
|
|
||||||
99832 # Germanisch
|
|
||||||
99823 # Gotisch
|
|
||||||
99813 # Altalbanisch
|
|
||||||
98681 # Geistliche Lyrik von Luther bis Lehnert
|
|
||||||
99667 # Antike Mythologie
|
|
||||||
# 52365 # FSR KlassPhil
|
|
||||||
|
|
||||||
# SS 2021
|
|
||||||
104850 # Metrik
|
|
||||||
103274 # Marc Aurel
|
|
||||||
102909 # Sanskrit II
|
|
||||||
104937 # Altirisch
|
|
||||||
104925 # Gradierung und Komparation
|
|
||||||
105264 # Was andere Sprachen anders machen
|
|
||||||
104991 # Warum klingt Orkisch böse
|
|
||||||
105074 # Litauisch
|
|
||||||
103685 # Griechische Sprache und Übersetzung I
|
|
||||||
105455 # Elegia greca
|
|
||||||
105335 # Homerische Epen
|
|
||||||
];
|
|
||||||
download_submissions = true;
|
|
||||||
download_descriptions = true;
|
|
||||||
download_links_in_descriptions = false;
|
|
||||||
download_databases = false;
|
|
||||||
download_forums = false;
|
|
||||||
download_linked_files = false;
|
|
||||||
download_also_with_cookie = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
30
configs/mopidy.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let secrets = import <dot/secrets.nix>;
|
||||||
|
in {
|
||||||
|
services.mopidy = {
|
||||||
|
enable = true;
|
||||||
|
extensionPackages = [
|
||||||
|
pkgs.mopidy-gmusic
|
||||||
|
pkgs.mopidy-iris
|
||||||
|
pkgs.mopidy-moped
|
||||||
|
pkgs.mopidy-mopify
|
||||||
|
pkgs.mopidy-soundcloud
|
||||||
|
pkgs.mopidy-spotify
|
||||||
|
pkgs.mopidy-spotify-tunigo
|
||||||
|
pkgs.mopidy-youtube
|
||||||
|
];
|
||||||
|
configuration = ''
|
||||||
|
[mpd]
|
||||||
|
hostname = ::
|
||||||
|
|
||||||
|
[spotify]
|
||||||
|
username = ${secrets.spotify.username}
|
||||||
|
password = ${secrets.spotify.password}
|
||||||
|
client_id = ${secrets.spotify.clientId}
|
||||||
|
client_secret = ${secrets.spotify.clientSecret}
|
||||||
|
|
||||||
|
[soundcloud]
|
||||||
|
auth_token = ${secrets.soundcloud.authToken}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,24 +1,17 @@
|
|||||||
{ pkgs, ... }: let
|
{ pkgs, ... }:
|
||||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
{
|
||||||
in {
|
environment.systemPackages = [ pkgs.mpv pkgs.mpv-poll ];
|
||||||
environment.shellAliases.smpv = swallow "mpv";
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me.xdg.configFile = {
|
||||||
programs.mpv = {
|
"mpv/input.conf".text = ''
|
||||||
enable = true;
|
Alt+RIGHT add video-rotate 90
|
||||||
config = {
|
Alt+LEFT add video-rotate -90
|
||||||
ytdl-format = "bestvideo+bestaudio/best";
|
Alt+- add video-zoom -0.25
|
||||||
};
|
Alt+= add video-zoom 0.25
|
||||||
bindings = {
|
Alt+l add video-pan-x -0.05
|
||||||
"Alt+RIGHT" = "add video-rotate 90";
|
Alt+h add video-pan-x 0.05
|
||||||
"Alt+LEFT" = "add video-rotate -90";
|
Alt+k add video-pan-y 0.05
|
||||||
"Alt+-" = "add video-zoom -0.25";
|
Alt+j add video-pan-y -0.05
|
||||||
"Alt+=" = "add video-zoom 0.25";
|
'';
|
||||||
"Alt+l" = "add video-pan-x -0.05";
|
|
||||||
"Alt+h" = "add video-pan-x 0.05";
|
|
||||||
"Alt+k" = "add video-pan-y 0.05";
|
|
||||||
"Alt+j" = "add video-pan-y -0.05";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,77 +1,109 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||||
environment.shellAliases.vi = "nvim";
|
environment.shellAliases.vi = "nvim";
|
||||||
environment.shellAliases.vim = "nvim";
|
environment.shellAliases.vim = "nvim";
|
||||||
environment.shellAliases.view = "nvim -R";
|
environment.shellAliases.view = "nvim -R";
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
|
||||||
vimPlugins = pkgs.vimPlugins // {
|
|
||||||
cheat-sh-vim = pkgs.callPackage <niveum/packages/vimPlugins/cheat-sh.nix> { };
|
|
||||||
vim-fetch = pkgs.callPackage <niveum/packages/vimPlugins/vim-fetch.nix> { };
|
|
||||||
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> { };
|
|
||||||
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> { };
|
|
||||||
vim-mail = pkgs.callPackage <niveum/packages/vimPlugins/vim-mail.nix> { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
|
||||||
(pkgs.neovim.override {
|
(pkgs.neovim.override {
|
||||||
configure = {
|
configure = {
|
||||||
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
|
customRC = builtins.readFile <dot/vimrc>;
|
||||||
packages.nvim = with pkgs.vimPlugins; {
|
packages.nvim = with pkgs.vimPlugins; {
|
||||||
start = [
|
start = with pkgs.vimPlugins; [
|
||||||
# cheat-sh-vim
|
|
||||||
# deoplete-nvim
|
|
||||||
# vim-abolish
|
|
||||||
ale
|
ale
|
||||||
|
deoplete-nvim
|
||||||
fzf-vim
|
fzf-vim
|
||||||
fzfWrapper
|
fzfWrapper
|
||||||
goyo
|
|
||||||
supertab
|
supertab
|
||||||
undotree
|
|
||||||
tabular
|
tabular
|
||||||
vimwiki
|
vim-abolish
|
||||||
vim-256noir
|
|
||||||
vim-colors-paramount
|
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-css-color
|
|
||||||
vim-eunuch
|
vim-eunuch
|
||||||
vim-fetch
|
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
vim-pandoc
|
vim-pandoc vim-pandoc-after vim-pandoc-syntax
|
||||||
vim-pandoc-syntax # vim-pandoc-after
|
|
||||||
vim-repeat
|
vim-repeat
|
||||||
vim-sensible
|
vim-sensible
|
||||||
# vim-startify
|
vim-startify
|
||||||
vim-surround
|
vim-surround
|
||||||
vim-mail
|
(pkgs.vimUtils.buildVimPluginFrom2Nix rec {
|
||||||
|
name = "vim-fetch";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "wsdjeg";
|
||||||
|
repo = "vim-fetch";
|
||||||
|
rev = "76c08586e15e42055c9c21321d9fca0677442ecc";
|
||||||
|
sha256 = "0avcqjcqvxgj00r477ps54rjrwvmk5ygqm3qrzghbj9m1gpyp2kz";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix rec {
|
||||||
|
name = "vim-colors-paramount";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "owickstrom";
|
||||||
|
repo = "vim-colors-paramount";
|
||||||
|
rev = "a5601d36fb6932e8d1a6f8b37b179a99b1456798";
|
||||||
|
sha256 = "0rjn9vjb0xrxbiqyfclda2ridcbl3nfn4svs32mvmv8als6crncg";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "vim-256noir";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "andreasvc";
|
||||||
|
repo = "vim-256noir";
|
||||||
|
rev = "e8668a18a4a90272c1cae87e655f8bddc5ac3665";
|
||||||
|
sha256 = "1kpn379f5dgbsgb73g6d1nlmz9vz0j3ihi500mcdx4yg56fvkr0x";
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
opt = [
|
opt = [
|
||||||
csv
|
csv
|
||||||
dhall-vim
|
dhall-vim
|
||||||
elm-vim
|
elm-vim
|
||||||
emmet-vim
|
|
||||||
haskell-vim
|
haskell-vim
|
||||||
icalendar-vim
|
|
||||||
idris-vim
|
idris-vim
|
||||||
nim-vim
|
|
||||||
jq-vim
|
|
||||||
purescript-vim
|
|
||||||
rust-vim
|
rust-vim
|
||||||
typescript-vim
|
typescript-vim
|
||||||
vim-fsharp
|
|
||||||
vim-javascript
|
vim-javascript
|
||||||
vim-ledger
|
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-reason-plus
|
|
||||||
vim-toml
|
vim-toml
|
||||||
vimtex
|
vimtex
|
||||||
|
vim-ledger
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "todo.txt-vim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "freitass";
|
||||||
|
repo = "todo.txt-vim";
|
||||||
|
rev = "6845221d45bd62e604c2024bc511a56e79d1118b";
|
||||||
|
sha256 = "08m9q5f2pz6gjp0vkmm7glfsrbnldxi1j59dm5d7any6y96xxd6v";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "jq.vim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "vito-c";
|
||||||
|
repo = "jq.vim";
|
||||||
|
rev = "5baf8ed192cf267d30b84e3243d9aab3d4912e60";
|
||||||
|
sha256 = "1ykaxlli7b9wmhr8lpdalqxh7l4940jwhwm9pwlraga425h4r6z4";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "vim-fsharp";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "fsharp";
|
||||||
|
repo = "vim-fsharp";
|
||||||
|
rev = "627db7d701747e8fd7924b6505c61e16a369fb72";
|
||||||
|
sha256 = "00hhgn2p54faysx1ddccyhl9jnvddgxsczhv0np3mgzza6ls4838";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "emmet-vim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "mattn";
|
||||||
|
repo = "emmet-vim";
|
||||||
|
rev = "d698f1658770ca5fa58c87e80421c8d65bbe9065";
|
||||||
|
sha256 = "0vl4267hh8g1vkvc3awlqyypgz4m1r43d47sldl80yamiafiviaj";
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
let
|
|
||||||
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
|
||||||
|
|
||||||
newsboat-home =
|
|
||||||
"${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
|
||||||
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
|
||||||
|
|
||||||
newsboat-config = pkgs.writeText "config" ''
|
|
||||||
auto-reload no
|
|
||||||
prepopulate-query-feeds yes
|
|
||||||
|
|
||||||
# dont keep a search history
|
|
||||||
history-limit 0
|
|
||||||
|
|
||||||
datetime-format %F
|
|
||||||
|
|
||||||
text-width 85
|
|
||||||
|
|
||||||
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
|
|
||||||
browser ${linkhandler-bin}
|
|
||||||
macro , open-in-browser
|
|
||||||
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler-bin}
|
|
||||||
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler-bin}
|
|
||||||
macro y set browser "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata" ; open-in-browser ; set browser ${linkhandler-bin}
|
|
||||||
|
|
||||||
bind-key j down
|
|
||||||
bind-key k up
|
|
||||||
bind-key j next articlelist
|
|
||||||
bind-key k prev articlelist
|
|
||||||
bind-key J next-feed articlelist
|
|
||||||
bind-key K prev-feed articlelist
|
|
||||||
bind-key G end
|
|
||||||
bind-key g home
|
|
||||||
bind-key d pagedown
|
|
||||||
bind-key u pageup
|
|
||||||
bind-key l open
|
|
||||||
bind-key h quit
|
|
||||||
bind-key a toggle-article-read
|
|
||||||
bind-key n next-unread
|
|
||||||
bind-key N prev-unread
|
|
||||||
bind-key D pb-download
|
|
||||||
bind-key U show-urls
|
|
||||||
bind-key x pb-delete
|
|
||||||
|
|
||||||
save-path ${newsboat-home}/saved/
|
|
||||||
|
|
||||||
highlight all "---.*---" yellow default
|
|
||||||
highlight feedlist ".*(0/0))" black default
|
|
||||||
highlight article "^Title:.*" yellow default bold
|
|
||||||
highlight article "^Author:.*" yellow default
|
|
||||||
highlight article "^Flags:.*" red default
|
|
||||||
highlight article "\\[[0-9][0-9]*\\]" color66 default bold
|
|
||||||
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
|
|
||||||
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold
|
|
||||||
|
|
||||||
color background white default
|
|
||||||
color listnormal white default
|
|
||||||
color listnormal_unread white default bold
|
|
||||||
color listfocus blue default
|
|
||||||
color listfocus_unread blue default bold
|
|
||||||
color info red default bold
|
|
||||||
color article white default
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
|
||||||
newsboat = pkgs.writers.writeDashBin "newsboat" ''
|
|
||||||
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.newsboat ];
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) localAddresses;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.nextcloud = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.nextcloud21;
|
|
||||||
|
|
||||||
https = true;
|
|
||||||
|
|
||||||
autoUpdateApps = {
|
|
||||||
enable = true;
|
|
||||||
startAt = "05:00:00";
|
|
||||||
};
|
|
||||||
|
|
||||||
hostName = "cloud.xn--kiern-0qa.de";
|
|
||||||
|
|
||||||
config = {
|
|
||||||
overwriteProtocol = "https";
|
|
||||||
|
|
||||||
dbtype = "pgsql";
|
|
||||||
dbuser = "nextcloud";
|
|
||||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
|
||||||
dbname = "nextcloud";
|
|
||||||
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
|
|
||||||
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
|
|
||||||
adminuser = "admin";
|
|
||||||
# extraTrustedDomains = [ "toum.r" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
ensureDatabases = [ "nextcloud" ];
|
|
||||||
ensureUsers = [
|
|
||||||
{
|
|
||||||
name = "nextcloud";
|
|
||||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
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"];
|
|
||||||
after = ["postgresql.service"];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
# enable `nix flake`
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nix;
|
|
||||||
# extraOptions = ''
|
|
||||||
# experimental-features = nix-command
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
8
configs/nixpkgs-unstable.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
unstable = import <nixos-unstable> {
|
||||||
|
config = config.nixpkgs.config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{ 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,189 +1,107 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
{
|
||||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
|
||||||
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
|
||||||
|
|
||||||
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
|
|
||||||
owner = "kmein";
|
|
||||||
repo = "recht";
|
|
||||||
rev = "0.6.2";
|
|
||||||
sha256 = "08gnrnz3lwh8h6fyga56yfy9qryzm89xbshm7wpxfyxf2pmp1qfx";
|
|
||||||
}) {};
|
|
||||||
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./krebs.nix
|
./krebs.nix
|
||||||
|
./programming.nix
|
||||||
./writing.nix
|
./writing.nix
|
||||||
./python.nix
|
|
||||||
./haskell
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = let
|
environment.systemPackages = with pkgs; [
|
||||||
# nightly = pkgs.rustChannelOf {
|
] ++ [ # internet
|
||||||
# date = "2019-12-27";
|
aria2
|
||||||
# channel = "nightly";
|
firefox
|
||||||
# };
|
tor-browser-bundle-bin
|
||||||
in with pkgs; [
|
thunderbird
|
||||||
htmlTidy
|
tdesktop
|
||||||
nodePackages.csslint
|
w3m
|
||||||
nodePackages.jsonlint
|
wget
|
||||||
nodePackages.prettier
|
httpie
|
||||||
nodePackages.typescript
|
whois
|
||||||
nodePackages.yarn
|
ddgr
|
||||||
nodejs
|
python3Packages.instaloader
|
||||||
nodePackages.javascript-typescript-langserver
|
mtr # my traceroute
|
||||||
|
] ++ [ # media
|
||||||
tokei # count lines of code
|
ffmpeg
|
||||||
gnumake
|
imagemagick
|
||||||
binutils # for strip, ld, ...
|
sxiv
|
||||||
# nightly.rust
|
] ++ [ # archive
|
||||||
shellcheck
|
unzip
|
||||||
|
unrar
|
||||||
|
p7zip
|
||||||
|
zip
|
||||||
|
] ++ [ # monitor
|
||||||
|
htop
|
||||||
|
iotop
|
||||||
|
iftop
|
||||||
|
lsof
|
||||||
|
psmisc
|
||||||
|
] ++ [ # shell
|
||||||
|
bat
|
||||||
|
dos2unix
|
||||||
|
ncdu
|
||||||
|
du-dust
|
||||||
|
fd
|
||||||
|
file
|
||||||
|
jq # json manipulation
|
||||||
|
jo # json creation
|
||||||
|
kmein.nav # json navigation
|
||||||
|
xsv
|
||||||
|
xmlstarlet
|
||||||
|
manpages
|
||||||
|
posix_man_pages
|
||||||
|
moreutils
|
||||||
|
ranger
|
||||||
|
ripgrep
|
||||||
|
rlwrap
|
||||||
|
progress # display progress bars for pipes
|
||||||
|
up # universal plumber (piping tool)
|
||||||
|
] ++ [ # hardware
|
||||||
|
usbutils
|
||||||
|
pciutils
|
||||||
|
lshw
|
||||||
|
] ++ [ # graphical
|
||||||
|
arandr
|
||||||
|
libnotify
|
||||||
|
xclip
|
||||||
|
xorg.xkill
|
||||||
|
] ++ [ # programming
|
||||||
|
nix-prefetch-git
|
||||||
|
] ++ [ # media
|
||||||
|
audacity
|
||||||
|
calibre
|
||||||
|
inkscape
|
||||||
|
xpdf
|
||||||
|
pdfgrep
|
||||||
|
pdftk
|
||||||
|
spotify
|
||||||
|
python3Packages.spotify-cli-linux
|
||||||
|
youtubeDL
|
||||||
|
] ++ [ # math
|
||||||
|
bc
|
||||||
|
] ++ [ # shell
|
||||||
|
(pass.withExtensions (ext: [ext.pass-otp]))
|
||||||
|
fzf
|
||||||
|
gnupg
|
||||||
|
kmein.haskellPackages.mnemosyne
|
||||||
|
kmein.autorenkalender
|
||||||
|
kmein.bvg
|
||||||
|
kmein.daybook
|
||||||
|
kmein.depp
|
||||||
|
kmein.font-size
|
||||||
|
kmein.genius
|
||||||
|
kmein.instaget
|
||||||
|
kmein.literature-quote
|
||||||
|
kmein.n
|
||||||
|
kmein.odyssey
|
||||||
|
kmein.wttr
|
||||||
|
kmein.slide
|
||||||
|
memo
|
||||||
|
nix-git
|
||||||
|
par
|
||||||
|
qrencode
|
||||||
|
unstable.hugo
|
||||||
|
unstable.zola
|
||||||
|
wtf
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# INTERNET
|
|
||||||
aria2
|
|
||||||
# firefox
|
|
||||||
tdesktop
|
|
||||||
w3m
|
|
||||||
wget
|
|
||||||
httpie
|
|
||||||
whois
|
|
||||||
ddgr
|
|
||||||
ix
|
|
||||||
nur.repos.kmein.python3Packages.instaloader
|
|
||||||
dnsutils
|
|
||||||
# mtr # my traceroute
|
|
||||||
# FILE MANAGERS
|
|
||||||
ranger
|
|
||||||
pcmanfm
|
|
||||||
# MEDIA
|
|
||||||
ffmpeg
|
|
||||||
imagemagick
|
|
||||||
exiftool
|
|
||||||
scrot
|
|
||||||
# ARCHIVE TOOLS
|
|
||||||
unzip
|
|
||||||
unrar
|
|
||||||
p7zip
|
|
||||||
zip
|
|
||||||
# MONITORS
|
|
||||||
htop
|
|
||||||
iotop # I/O load monitor
|
|
||||||
iftop # interface bandwidth monitor
|
|
||||||
lsof # list open files
|
|
||||||
psmisc # for killall, pstree
|
|
||||||
# SHELL
|
|
||||||
bat # better cat
|
|
||||||
du-dust # better du
|
|
||||||
fd # better find
|
|
||||||
file # determine file type
|
|
||||||
dos2unix
|
|
||||||
trash-cli
|
|
||||||
ncdu # ncurses disk usage
|
|
||||||
python3Packages.jsonschema # json validation
|
|
||||||
jq # json toolkit
|
|
||||||
pup # html toolkit
|
|
||||||
jo # json creation
|
|
||||||
xsv # csv toolkit
|
|
||||||
xmlstarlet # xml toolkit
|
|
||||||
manpages
|
|
||||||
posix_man_pages
|
|
||||||
# moreutils # for parallel, sponge, combine
|
|
||||||
tree
|
|
||||||
fuse_exfat # to mount windows drives
|
|
||||||
parallel # for parallel, since moreutils shadows task spooler
|
|
||||||
ripgrep # better grep
|
|
||||||
rlwrap
|
|
||||||
progress # display progress bars for pipes
|
|
||||||
up # universal plumber (piping tool)
|
|
||||||
# HARDWARE TOOLS
|
|
||||||
usbutils # for lsusb
|
|
||||||
pciutils # for lspci
|
|
||||||
lshw # for lshw
|
|
||||||
arandr # xrandr for noobs
|
|
||||||
libnotify # for notify-send
|
|
||||||
xclip # clipboard CLI
|
|
||||||
dragon-drop # drag and drop
|
|
||||||
xorg.xkill # kill by clicking
|
|
||||||
audacity
|
|
||||||
calibre
|
|
||||||
inkscape
|
|
||||||
nixpkgs-unstable.zoom-us # video conferencing
|
|
||||||
pdfgrep # search in pdf
|
|
||||||
pdftk # pdf toolkit
|
|
||||||
poppler_utils # pdf toolkit
|
|
||||||
evince # for viewing pdf annotations
|
|
||||||
xournalpp # for annotating pdfs
|
|
||||||
pdfpc # presenter console for pdf slides
|
|
||||||
hc # print files as qr codes
|
|
||||||
youtubeDL
|
|
||||||
bc # calculator
|
|
||||||
pari # gp -- better calculator
|
|
||||||
scripts.infschmv
|
|
||||||
scripts.scanned
|
|
||||||
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
|
|
||||||
recht
|
|
||||||
# nur.repos.kmein.slide
|
|
||||||
nur.repos.kmein.vimv
|
|
||||||
scripts.swallow # window swallowing
|
|
||||||
scripts.genius
|
|
||||||
scripts.instaget
|
|
||||||
scripts.literature-quote
|
|
||||||
scripts.nav # json navigation
|
|
||||||
scripts.n
|
|
||||||
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 "$@"'')
|
|
||||||
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
|
|
||||||
|
|
||||||
spotify
|
|
||||||
spotify-tui
|
|
||||||
playerctl
|
|
||||||
|
|
||||||
nix-index
|
|
||||||
scripts.nix-index-update
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
home-manager.users.me.home.file = {
|
|
||||||
".ghc/ghci.conf".text = ''
|
|
||||||
:set editor vim
|
|
||||||
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
|
||||||
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
|
||||||
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
|
||||||
:set -Wall
|
|
||||||
:set -XOverloadedStrings
|
|
||||||
'';
|
|
||||||
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
|
||||||
# :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
|
||||||
".stack/config.yaml".source =
|
|
||||||
let inherit (import <niveum/lib>) kieran;
|
|
||||||
in (pkgs.formats.yaml {}).generate "config.yaml" {
|
|
||||||
templates.params = {
|
|
||||||
author-name = kieran.name;
|
|
||||||
author-email = kieran.email;
|
|
||||||
copyright = "Copyright: (c) 2020 ${kieran.name}";
|
|
||||||
github-username = kieran.github;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hoogle = {
|
|
||||||
enable = false;
|
|
||||||
packages = import ./packages.nix;
|
|
||||||
port = 8091;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
|
||||||
[
|
|
||||||
cabal2nix
|
|
||||||
cabal-install
|
|
||||||
hlint
|
|
||||||
haskellPackages.ormolu
|
|
||||||
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
|
||||||
] ++ map haskell.lib.justStaticExecutables [
|
|
||||||
haskellPackages.ghcid
|
|
||||||
haskellPackages.hasktags
|
|
||||||
# haskellPackages.hindent
|
|
||||||
# haskellPackages.pointfree
|
|
||||||
# haskellPackages.pointful
|
|
||||||
haskellPackages.hpack
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,19 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let krebs-packages = pkgs: {
|
||||||
krebs-packages = pkgs: {
|
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> {};
|
||||||
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> { };
|
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> {};
|
||||||
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> { };
|
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
|
||||||
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> { };
|
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
|
||||||
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> { };
|
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
|
||||||
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> { };
|
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> {};
|
||||||
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> { };
|
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> {};
|
||||||
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
|
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> {};
|
||||||
irc-announce =
|
bepasty-client-cli = pkgs.callPackage <stockholm/krebs/5pkgs/simple/bepasty-client-cli> {};
|
||||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> { };
|
irc-announce = pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> {};
|
||||||
git-preview =
|
git-preview = pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> {};
|
||||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> { };
|
};
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
nixpkgs.config.packageOverrides = krebs-packages;
|
nixpkgs.config.packageOverrides = krebs-packages;
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages = map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs));
|
||||||
map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs));
|
|
||||||
}
|
}
|
||||||
|
|||||||
28
configs/packages/programming.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
htmlTidy
|
||||||
|
nodePackages_10_x.csslint
|
||||||
|
nodePackages_10_x.jsonlint
|
||||||
|
nodePackages_10_x.prettier
|
||||||
|
nodePackages_10_x.typescript
|
||||||
|
nodePackages_10_x.yarn
|
||||||
|
nodejs-10_x
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tokei # count lines of code
|
||||||
|
gnumake
|
||||||
|
gcc
|
||||||
|
binutils # strip, ld, ...
|
||||||
|
iolanguage
|
||||||
|
ruby
|
||||||
|
rubocop
|
||||||
|
rustup
|
||||||
|
shellcheck
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.python3.withPackages (py: [
|
|
||||||
py.black
|
|
||||||
py.python-language-server
|
|
||||||
py.pyls-mypy
|
|
||||||
py.pyls-black
|
|
||||||
py.pyls-isort
|
|
||||||
py.flake8
|
|
||||||
py.pygments
|
|
||||||
py.schema
|
|
||||||
]))
|
|
||||||
pkgs.python3Packages.poetry
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
|
||||||
[pycodestyle]
|
|
||||||
max-line-length = 110
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,78 +1,17 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
{
|
||||||
zoteroStyle = { name, sha256 }: {
|
|
||||||
name = "${name}.csl";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "https://www.zotero.org/styles/${name}";
|
|
||||||
inherit sha256;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cslDirectory = pkgs.linkFarm "citation-styles" [
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "chicago-author-date-de";
|
|
||||||
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
|
|
||||||
})
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "din-1505-2";
|
|
||||||
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
|
||||||
})
|
|
||||||
(zoteroStyle {
|
|
||||||
name = "apa";
|
|
||||||
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
makeStardictDataDir = dicts:
|
|
||||||
pkgs.linkFarm "dictionaries" (map ({ name, path }: {
|
|
||||||
name = "dic/${name}";
|
|
||||||
inherit path;
|
|
||||||
}) dicts);
|
|
||||||
in {
|
|
||||||
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
|
|
||||||
{
|
|
||||||
name = "gr-de";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/pape_gr-de.zip";
|
|
||||||
sha256 = "1d705y47b40vp0mg79vbwasw4y0i8fmnlwvf4x4ri0dkfqng9sky";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "la-de";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/georges_lat-de.zip";
|
|
||||||
sha256 = "12n26nzwg28wn4zwv45mv0wkgy1jh1d8p0k6haamz9601cqq7hkj";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "de-la";
|
|
||||||
path = pkgs.fetchurl {
|
|
||||||
url = "http://tovotu.de/data/stardict/georges_de-lat.zip";
|
|
||||||
sha256 = "0inm6xn1lcnb851cj329n0v2vbfc1z1bxwhgsd8fnm0zxy3f3ifq";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
home-manager.users.me.home.file = {
|
|
||||||
".csl".source = cslDirectory;
|
|
||||||
".local/share/pandoc/csl".source = cslDirectory; # as of pandoc 2.11, it includes citeproc
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
texlive.combined.scheme-full
|
(texlive.combine {
|
||||||
latexrun
|
inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo;
|
||||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo";
|
||||||
# haskellPackages.pandoc-citeproc
|
})
|
||||||
nur.repos.kmein.text2pdf
|
# haskellPackages.patat
|
||||||
lowdown
|
(aspellWithDicts (dict: [dict.de dict.en dict.la dict.en-computers dict.ru]))
|
||||||
glow # markdown to term
|
haskellPackages.pandoc-citeproc
|
||||||
libreoffice
|
libreoffice
|
||||||
# gnumeric
|
|
||||||
dia
|
|
||||||
pandoc
|
pandoc
|
||||||
# proselint
|
proselint
|
||||||
asciidoctor
|
unstable.asciidoctor
|
||||||
wordnet
|
wordnet
|
||||||
# sdcv # stardict cli
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
{ 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}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||