Compare commits
1 Commits
| 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
|
|
||||||
46
.bin/bvg.sh
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
interesting="U6 N6 140 M46 184 N84"
|
|
||||||
|
|
||||||
curl -sSL 'https://www.bvg.de/disruption-reports/q' \
|
|
||||||
--data-raw '{"variables":{},"query":"{
|
|
||||||
allDisruptions {
|
|
||||||
disruptions {
|
|
||||||
meldungsId
|
|
||||||
linie
|
|
||||||
verkehrsmittel
|
|
||||||
__typename
|
|
||||||
... on Traffic {
|
|
||||||
datum
|
|
||||||
gueltigVonDatum
|
|
||||||
gueltigVonZeit
|
|
||||||
gueltigBisDatum
|
|
||||||
gueltigBisZeit
|
|
||||||
richtungName
|
|
||||||
richtungHafasId
|
|
||||||
beginnAbschnittName
|
|
||||||
beginnAbschnittHafasId
|
|
||||||
endeAbschnittName
|
|
||||||
endeAbschnittHafasId
|
|
||||||
textIntUrsache
|
|
||||||
sev
|
|
||||||
textIntAuswirkung
|
|
||||||
umfahrung
|
|
||||||
textWAPSMSUrsache
|
|
||||||
textWAPSMSAuswirkung
|
|
||||||
prioritaet
|
|
||||||
__typename
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__typename
|
|
||||||
}
|
|
||||||
}"}' \
|
|
||||||
| jq --arg interesting "$interesting" '
|
|
||||||
.data.allDisruptions.disruptions
|
|
||||||
| map(select(
|
|
||||||
(.linie as $linie
|
|
||||||
| $interesting
|
|
||||||
| split(" ")
|
|
||||||
| index($linie))
|
|
||||||
and (.["__typename"] == "Traffic")
|
|
||||||
))
|
|
||||||
'
|
|
||||||
@@ -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,14 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import csv
|
|
||||||
import json
|
|
||||||
import sys
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("--delimiter", "-d", default=",", help="CSV field separator")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
json.dump(list(csv.DictReader(sys.stdin, delimiter=args.delimiter)), sys.stdout)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#! /usr/bin/env nix-shell
|
|
||||||
#! nix-shell -p "(import <nixpkgs> { overlays = [ (import ~/work/fysiweb/engiadina-pwa/devops/pkgs) ]; }).elm-publish-private"
|
|
||||||
#! nix-shell -i bash
|
|
||||||
|
|
||||||
set -efux
|
|
||||||
|
|
||||||
exec elm-publish-private "$@"
|
|
||||||
@@ -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,24 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import csv
|
|
||||||
import json
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
json_list = json.load(sys.stdin)
|
|
||||||
if not isinstance(json_list, list):
|
|
||||||
print("JSON object is not a list.", file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
if len(json_list) == 0:
|
|
||||||
print("JSON list is empty.", file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
keys = set()
|
|
||||||
for element in json_list:
|
|
||||||
if isinstance(element, dict):
|
|
||||||
keys |= element.keys()
|
|
||||||
else:
|
|
||||||
print("Non-dict element:", element, file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
writer = csv.DictWriter(sys.stdout, fieldnames=list(keys))
|
|
||||||
writer.writeheader()
|
|
||||||
for element in json_list:
|
|
||||||
writer.writerow(element)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
session_id=7b638c194d9bda74f80043045018cc9e
|
|
||||||
|
|
||||||
declare -A libraries
|
|
||||||
|
|
||||||
libraries["Literatur"]=344428
|
|
||||||
libraries["Sprache"]=344160
|
|
||||||
libraries["Miscellanea"]=344427
|
|
||||||
libraries["Wissenschaft"]=344429
|
|
||||||
libraries["Relicta"]=565920
|
|
||||||
|
|
||||||
for library in ${!libraries[@]}
|
|
||||||
do
|
|
||||||
curl -sSL 'https://www.libib.com/library/functions/csv-export.php' -H "Cookie: PHPSESSID=$session_id" -d export="${libraries[$library]}" > "$library.csv"
|
|
||||||
done
|
|
||||||
@@ -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}'
|
|
||||||
17
.bin/lit.awk
@@ -1,17 +0,0 @@
|
|||||||
BEGIN {
|
|
||||||
if (!comment) comment = "--";
|
|
||||||
if (!begin) begin = "\\begin{code}";
|
|
||||||
if (!end) end = "\\end{code}";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
if ($0 == begin) {
|
|
||||||
code = 1;
|
|
||||||
print comment, $0;
|
|
||||||
} else if ($0 == end) {
|
|
||||||
code = 0;
|
|
||||||
print comment, $0;
|
|
||||||
} else {
|
|
||||||
if (code) print $0;
|
|
||||||
else print comment, $0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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 +0,0 @@
|
|||||||
ssh mud@hotdog.r -t "MUD_NICKNAME=$LOGNAME mud"
|
|
||||||
@@ -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,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
curl -sSL https://www.netzwelt.de/proxy/index.html \
|
|
||||||
| pup ".tblc" \
|
|
||||||
| xml-to-json /dev/stdin \
|
|
||||||
| jq '
|
|
||||||
.div.table.tbody.tr
|
|
||||||
| map(
|
|
||||||
.td
|
|
||||||
| {
|
|
||||||
ip: .[0].a.value,
|
|
||||||
port: .[1],
|
|
||||||
country: .[2] | (if type == "string" then . else .a.value end),
|
|
||||||
security: .[3],
|
|
||||||
protocol: .[4]
|
|
||||||
}
|
|
||||||
)
|
|
||||||
'
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
curl -sSL "https://raw.githubusercontent.com/$*/master/README.md" \
|
|
||||||
| pandoc -f gfm -t man -s \
|
|
||||||
| man -l -
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
filepath="$(shuf --head-count=1)"
|
|
||||||
pages="$(pdfinfo "$filepath" | awk '/^Pages:/{print $2}')"
|
|
||||||
random_page="$(shuf --input-range="1-$pages" --head-count=1)"
|
|
||||||
zathura --page="$random_page" "$filepath"
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
import ephem
|
|
||||||
from datetime import datetime, date, timedelta
|
|
||||||
|
|
||||||
now = datetime.now()
|
|
||||||
limit = now + timedelta(days=365)
|
|
||||||
|
|
||||||
|
|
||||||
def events_until(limit):
|
|
||||||
initial_date = ephem.Date(datetime.now())
|
|
||||||
events = {}
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_full_moon(now)
|
|
||||||
events[now] = "🌕"
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_new_moon(now)
|
|
||||||
events[now] = "🌑"
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_vernal_equinox(now)
|
|
||||||
events[now] = "spring equinox"
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_autumnal_equinox(now)
|
|
||||||
events[now] = "fall equinox"
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_winter_solstice(now)
|
|
||||||
events[now] = "winter solstice"
|
|
||||||
|
|
||||||
now = initial_date
|
|
||||||
while ephem.localtime(now) <= limit:
|
|
||||||
now = ephem.next_summer_solstice(now)
|
|
||||||
events[now] = "summer solstice"
|
|
||||||
return events
|
|
||||||
|
|
||||||
|
|
||||||
events = events_until(limit)
|
|
||||||
|
|
||||||
|
|
||||||
for date, event in sorted(events.items(), key=lambda x: x[0]):
|
|
||||||
if ephem.localtime(date) < limit:
|
|
||||||
print(ephem.localtime(date), event)
|
|
||||||
19
.github/workflows/flake.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
name: Update flake.lock
|
|
||||||
on:
|
|
||||||
workflow_dispatch: # allows manual triggering
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lockfile:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v16
|
|
||||||
with:
|
|
||||||
extra_nix_config: |
|
|
||||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Update flake.lock
|
|
||||||
uses: DeterminateSystems/update-flake-lock@v3
|
|
||||||
14
.github/workflows/niveum.yml
vendored
@@ -1,14 +0,0 @@
|
|||||||
name: CI
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
system: [makanek,manakish,kabsa,zaatar]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: cachix/install-nix-action@v16
|
|
||||||
- run: nix run .#build-${{matrix.system}}
|
|
||||||
6
.gitignore
vendored
@@ -1,6 +1,2 @@
|
|||||||
|
secrets.nix
|
||||||
result
|
result
|
||||||
.direnv
|
|
||||||
.envrc
|
|
||||||
.history
|
|
||||||
.todo
|
|
||||||
node_modules
|
|
||||||
|
|||||||
10
README.md
@@ -1,10 +0,0 @@
|
|||||||
# niveum
|
|
||||||
|
|
||||||
> [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.)
|
|
||||||
>
|
|
||||||
> 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.—
|
|
||||||
>
|
|
||||||
> 2. Transf., _snow-white, snowy_ (mostly poet.): a similitudine sic: Corpore niveum candorem, aspectu igneum ardorem assequebatur, Auct. Her. 4, 33, 44: lacerti, Verg. A. 8, 387: lac, id. E. 2, 20: hanc si capite niveae agnae exorari judicas, Sen. Q. N. 2, 36: Briseis niveo colore, Hor. C. 2, 4, 3: vestis, Ov. M. 10, 432: candidior nivei folio, Galatea, ligustri, id. ib. 13, 789: dens, id. H. 18, 18: quā notam duxit niveus videri, Hor. C. 4, 2, 59: panis, Juv. 5, 70: flumen, _clear, pellucid_, Sen. Hippol. 504: undae, Mart. 7, 32, 11: tribuni, _clothed in white togas_, Calp. Ecl. 7, 29; so, Quirites, Juv. 10, 45.
|
|
||||||
|
|
||||||
## Pressestimmen
|
|
||||||
> das ist ja pure poesie —[xkey](https://github.com/riotbib)
|
|
||||||
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 |
67
ci.nix
@@ -1,67 +0,0 @@
|
|||||||
{ inputs, system, name }:
|
|
||||||
let
|
|
||||||
inherit (inputs) nixpkgs;
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
ensureFiles = paths: pkgs.runCommand "directory" {} ''
|
|
||||||
set -efu
|
|
||||||
mkdir $out
|
|
||||||
cd $out
|
|
||||||
${nixpkgs.lib.concatMapStringsSep "\n" (path: ''
|
|
||||||
mkdir -p "$(dirname ${nixpkgs.lib.escapeShellArg path})"
|
|
||||||
echo foo > ${nixpkgs.lib.escapeShellArg path}
|
|
||||||
'') paths}
|
|
||||||
'';
|
|
||||||
nixPath = nixpkgs.lib.concatStringsSep ":" ([
|
|
||||||
"niveum=${toString ./.}"
|
|
||||||
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
|
|
||||||
"system-secrets=${systemSecrets}"
|
|
||||||
"secrets=${sharedSecrets}"
|
|
||||||
] ++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
|
|
||||||
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
|
|
||||||
sharedSecrets = ensureFiles [
|
|
||||||
"di.fm/key"
|
|
||||||
"eduroam/identity"
|
|
||||||
"eduroam/password"
|
|
||||||
"mail/cock"
|
|
||||||
"mail/fastmail"
|
|
||||||
"mail/gmail/amroplay"
|
|
||||||
"mail/gmail/kieran.meinhardt"
|
|
||||||
"mail/meinhaki"
|
|
||||||
"mail/posteo"
|
|
||||||
"nextcloud-fysi/password"
|
|
||||||
"nextcloud/password"
|
|
||||||
"openweathermap.key"
|
|
||||||
"restic/password"
|
|
||||||
"traadfri.key"
|
|
||||||
"wifi/Aether.psk"
|
|
||||||
"spotify/username"
|
|
||||||
"spotify/password"
|
|
||||||
];
|
|
||||||
systemSecrets = let basic = [ "retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"]; in {
|
|
||||||
zaatar = ensureFiles ([ "moodle.token" "telegram/moodle-dl.token" "mpd-web.key" ] ++ basic);
|
|
||||||
kabsa = ensureFiles basic;
|
|
||||||
manakish = ensureFiles basic;
|
|
||||||
makanek = ensureFiles ([
|
|
||||||
"irc/retiolum"
|
|
||||||
"irc/hackint"
|
|
||||||
"irc/libera"
|
|
||||||
"irc/oftc"
|
|
||||||
"matrix/nibbana"
|
|
||||||
"maxmind/license.key"
|
|
||||||
"moodle-dl/faye.token"
|
|
||||||
"nextcloud/admin"
|
|
||||||
"nextcloud/database"
|
|
||||||
"telegram/nachtischsatan.token"
|
|
||||||
"telegram/reverse.token"
|
|
||||||
"telegram/odyssey.token"
|
|
||||||
"telegram/betacode.token"
|
|
||||||
"telegram/moodle-dl.token"
|
|
||||||
"telegram/proverb.token"
|
|
||||||
"telegram/menstruation.token"
|
|
||||||
"telegram/cool_village.token"
|
|
||||||
"telegram/kmein.token"
|
|
||||||
"telegram/prometheus.token"
|
|
||||||
"weechat/relay"
|
|
||||||
] ++ basic);
|
|
||||||
}.${name};
|
|
||||||
in toString (pkgs.writers.writeDash "build" "NIX_PATH=${nixPath} nix-build '<nixpkgs/nixos>' -A system --dry-run")
|
|
||||||
@@ -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,44 +0,0 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) restic;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.restic.backups.niveum = {
|
|
||||||
initialize = true;
|
|
||||||
inherit (restic) repository;
|
|
||||||
timerConfig = { OnCalendar = "8:00"; RandomizedDelaySec = "1h"; };
|
|
||||||
passwordFile = toString <secrets/restic/password>;
|
|
||||||
extraBackupArgs = [
|
|
||||||
"--exclude=/home/kfm/projects/nixpkgs/.git"
|
|
||||||
"--exclude=node_modules"
|
|
||||||
];
|
|
||||||
paths = [
|
|
||||||
"/home/kfm/work"
|
|
||||||
"/home/kfm/projects"
|
|
||||||
"/home/kfm/cloud"
|
|
||||||
"/home/kfm/.gnupg"
|
|
||||||
"/home/kfm/.ssh"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.restic-backups-niveum.serviceConfig = {
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = "15s";
|
|
||||||
StartLimitIntervalSec = "1m"; # don't try more than 4 times
|
|
||||||
StartLimitBurst = 4;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
|
||||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${<secrets/restic/password>} "$@"
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
|
||||||
mountdir=$(mktemp -d)
|
|
||||||
trap clean EXIT
|
|
||||||
clean() {
|
|
||||||
rm -r "$mountdir"
|
|
||||||
}
|
|
||||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${<secrets/restic/password>} mount "$mountdir"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -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 +0,0 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ pkgs.beets ];
|
|
||||||
home-manager.users.me.xdg.configFile = {
|
|
||||||
"beets/config.yaml".source = (pkgs.formats.yaml {}).generate "config.yaml" {
|
|
||||||
directory = "~/cloud/syncthing/music";
|
|
||||||
library = "~/cloud/syncthing/common/music.db";
|
|
||||||
plugins = toString [ "fetchart" "lastgenre" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -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.brave ];
|
environment.systemPackages = [ pkgs.chromium ];
|
||||||
|
|
||||||
environment.variables.BROWSER = "brave";
|
niveum.applications.browser = "chromium";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +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 = false;
|
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 = {
|
|
||||||
services.nextcloud-client = {
|
|
||||||
enable = true;
|
|
||||||
startInBackground = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
niveum.google-drive = rec {
|
||||||
(pkgs.writers.writeDashBin "book" ''
|
enable = true;
|
||||||
set -efu
|
directory = "${user.home}/cloud/gdrive";
|
||||||
book="$({
|
user = config.users.users.me;
|
||||||
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/syncthing/library -type f
|
|
||||||
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/Seafile/Books -type f
|
|
||||||
} | ${pkgs.fzf}/bin/fzf)"
|
|
||||||
${pkgs.zathura}/bin/zathura "$book"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/media/moodle" = {
|
|
||||||
device = "zaatar.r:/moodle";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
|
||||||
"x-systemd.idle-timeout=600"
|
|
||||||
"noauto"
|
|
||||||
"x-systemd.automount"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.syncthing = rec {
|
services.syncthing = rec {
|
||||||
@@ -47,19 +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";
|
||||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
};
|
||||||
key = toString <system-secrets/syncthing/key.pem>;
|
|
||||||
inherit ((import <niveum/lib>).syncthing) devices;
|
krebs.syncthing = rec {
|
||||||
folders =
|
enable = true;
|
||||||
let cloud-dir = "${config.users.users.me.home}/cloud";
|
key = toString <secrets/syncthing/key.pem>;
|
||||||
in {
|
cert = toString <secrets/syncthing/cert.pem>;
|
||||||
"${cloud-dir}/syncthing/common".devices = [ "kabsa" "manakish" ];
|
peers = {
|
||||||
"${cloud-dir}/syncthing/library".devices = [ "kabsa" "manakish" "heym" ];
|
homeros.id = "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
|
||||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "kabsa" "manakish" "heym" ];
|
scardanelli.id = "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
|
||||||
"${cloud-dir}/syncthing/music" = {
|
rilke.id = "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
|
||||||
devices = [ "kabsa" "manakish" "heym" "zaatar" ];
|
wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||||
id = "music";
|
};
|
||||||
};
|
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,37 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
copyqConfig = pkgs.writers.writeDash "copyq-config" ''
|
|
||||||
${pkgs.copyq}/bin/copyq config check_clipboard true
|
|
||||||
${pkgs.copyq}/bin/copyq config check_selection false
|
|
||||||
${pkgs.copyq}/bin/copyq config copy_clipboard true
|
|
||||||
${pkgs.copyq}/bin/copyq config copy_selection false
|
|
||||||
|
|
||||||
${pkgs.copyq}/bin/copyq config activate_closes true
|
|
||||||
${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
|
|
||||||
${pkgs.copyq}/bin/copyq config clipboard_tab \&clipboard
|
|
||||||
${pkgs.copyq}/bin/copyq config disable_tray false
|
|
||||||
${pkgs.copyq}/bin/copyq config hide_tabs false
|
|
||||||
${pkgs.copyq}/bin/copyq config hide_toolbar false
|
|
||||||
${pkgs.copyq}/bin/copyq config item_popup_interval true
|
|
||||||
${pkgs.copyq}/bin/copyq config maxitems 1000
|
|
||||||
${pkgs.copyq}/bin/copyq config move true
|
|
||||||
${pkgs.copyq}/bin/copyq config text_wrap true
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
environment.systemPackages = [ pkgs.copyq ];
|
|
||||||
|
|
||||||
systemd.user.services.copyq = {
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
environment = {
|
|
||||||
DISPLAY = ":${toString config.services.xserver.display}";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
SyslogIdentifier = "copyq";
|
|
||||||
ExecStart = "${pkgs.copyq}/bin/copyq";
|
|
||||||
ExecStartPost = copyqConfig;
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "15s";
|
|
||||||
StartLimitBurst = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,253 +1,274 @@
|
|||||||
{ 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: {
|
||||||
{
|
spotify-cli-linux = new.callPackage <packages/spotify-cli-linux.nix> {};
|
||||||
nixpkgs = {
|
instaloader = new.callPackage <packages/instaloader.nix> {};
|
||||||
config = {
|
sncli = new.callPackage <packages/sncli.nix> {};
|
||||||
allowUnfree = true;
|
};
|
||||||
packageOverrides = pkgs: {
|
};
|
||||||
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
haskellPackages = pkgs.haskellPackages.override {
|
||||||
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
|
overrides = new: old: {
|
||||||
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
blessings = new.callPackage <packages/blessings.nix> {};
|
||||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
|
scanner = new.callPackage <stockholm/krebs/5pkgs/haskell/scanner.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; };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
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;
|
|
||||||
home-manager.users.me.dconf.enable = false;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
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_DK.UTF-8"; }
|
{
|
||||||
|
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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
security.wrappers = {
|
security.wrappers = {
|
||||||
pmount = {
|
pmount.source = "${pkgs.pmount}/bin/pmount";
|
||||||
owner = "root";
|
pumount.source = "${pkgs.pmount}/bin/pumount";
|
||||||
group = "users";
|
|
||||||
source = "${pkgs.pmount}/bin/pmount";
|
|
||||||
};
|
|
||||||
pumount = {
|
|
||||||
owner = "root";
|
|
||||||
group = "users";
|
|
||||||
source = "${pkgs.pmount}/bin/pumount";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{ programs.command-not-found.enable = true; }
|
|
||||||
{
|
|
||||||
programs.gnupg.agent.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.gnupg
|
|
||||||
(pkgs.pass.withExtensions (e: [e.pass-otp]))
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
services.atd.enable = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
services.getty = {
|
|
||||||
greetingLine = lib.mkForce "";
|
|
||||||
helpLine = lib.mkForce "";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
networking.hosts = lib.mapAttrs' (name: address: {
|
programs.command-not-found.enable = true;
|
||||||
name = address;
|
}
|
||||||
value = [ "${name}.local" ];
|
{
|
||||||
}) localAddresses;
|
programs.java = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.openjdk;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
./alacritty.nix
|
|
||||||
./backup.nix
|
|
||||||
./bash.nix
|
|
||||||
./beets.nix
|
|
||||||
./bluetooth.nix
|
|
||||||
./ccc.nix
|
|
||||||
./khal.nix
|
|
||||||
./chromium.nix
|
|
||||||
./cloud.nix
|
|
||||||
./copyq.nix
|
|
||||||
./compton.nix
|
|
||||||
./direnv.nix
|
|
||||||
./distrobump.nix
|
|
||||||
./docker.nix
|
|
||||||
./dunst.nix
|
|
||||||
./flix.nix
|
|
||||||
./fonts.nix
|
|
||||||
./fzf.nix
|
|
||||||
./git.nix
|
|
||||||
./hledger.nix
|
|
||||||
./htop.nix
|
|
||||||
./hu-berlin.nix
|
|
||||||
./i3.nix
|
|
||||||
./keyboard.nix
|
|
||||||
./lb.nix
|
|
||||||
./mpv.nix
|
|
||||||
./mime.nix
|
|
||||||
./neovim.nix
|
|
||||||
./neomutt.nix
|
|
||||||
./nix.nix
|
|
||||||
./newsboat.nix
|
|
||||||
./flameshot-once.nix
|
|
||||||
./packages.nix
|
|
||||||
./stardict.nix
|
|
||||||
./polkit.nix
|
|
||||||
./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
|
|
||||||
./traadfri.nix
|
|
||||||
./unclutter.nix
|
|
||||||
./vscode.nix
|
|
||||||
./watson.nix
|
|
||||||
./zsh.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +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 = [];
|
|
||||||
}
|
|
||||||
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,12 +1,6 @@
|
|||||||
{ lib, pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
virtualisation.docker = {
|
{
|
||||||
enable = true;
|
virtualisation.docker.enable = true;
|
||||||
# for ICE wifi, ref https://gist.github.com/sunsided/7840e89ff4e11b64a2d7503fafa0290c
|
|
||||||
extraOptions = lib.concatStringsSep " " [
|
|
||||||
"--bip=172.39.1.5/24"
|
|
||||||
"--fixed-cidr=172.39.1.0/25"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users.users.me.extraGroups = [ "docker" ];
|
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,42 +0,0 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
inherit (import <niveum/lib>) defaultApplications;
|
|
||||||
flameshot-once =
|
|
||||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
|
||||||
in {
|
|
||||||
environment.systemPackages = [
|
|
||||||
(flameshot-once.override {
|
|
||||||
config = {
|
|
||||||
imgur = {
|
|
||||||
enable = true;
|
|
||||||
createUrl = "http://p.r/image";
|
|
||||||
deleteUrl = "http://p.r/image/delete/%1";
|
|
||||||
xdg-open.browser = (defaultApplications pkgs).browser;
|
|
||||||
};
|
|
||||||
timeout = 1000;
|
|
||||||
drawColor = "#ff0000";
|
|
||||||
drawThickness = 2;
|
|
||||||
showDesktopNotification = true;
|
|
||||||
buttons = [
|
|
||||||
"ARROW"
|
|
||||||
"BLUR"
|
|
||||||
"CIRCLE"
|
|
||||||
"CIRCLECOUNT"
|
|
||||||
"COPY"
|
|
||||||
"DRAWER"
|
|
||||||
"EXIT"
|
|
||||||
"IMAGEUPLOADER"
|
|
||||||
"MARKER"
|
|
||||||
"MOVESELECTION"
|
|
||||||
"PENCIL"
|
|
||||||
"RECTANGLE"
|
|
||||||
"SAVE"
|
|
||||||
"SELECTION"
|
|
||||||
"SELECTIONINDICATOR"
|
|
||||||
"TEXT"
|
|
||||||
"UNDO"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,78 +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"
|
|
||||||
"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;
|
|
||||||
group = flixGroup;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writers.writeDashBin "mpv-simpsons" ''
|
|
||||||
set -efu
|
|
||||||
cd "${flixLocation}/download"
|
|
||||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
|
||||||
|
|
||||||
cat "${cacheLocation}/${indexFilename}" \
|
|
||||||
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
|
|
||||||
| shuf \
|
|
||||||
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writeDashBin "flixmenu" ''
|
|
||||||
set -efu
|
|
||||||
cd "${flixLocation}/download"
|
|
||||||
|
|
||||||
[ -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,42 +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 ];
|
||||||
alegreya
|
|
||||||
alegreya-sans
|
|
||||||
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
|
|
||||||
tocharian-font
|
|
||||||
];
|
|
||||||
fontconfig.defaultFonts = {
|
|
||||||
monospace = [ "JetBrains Mono" "JoyPixels" ];
|
|
||||||
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,32 +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.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 = builtins.readFile <dot/mrconfig.ini>;
|
||||||
|
|
||||||
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";
|
||||||
@@ -38,22 +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;
|
|
||||||
|
|
||||||
# ref https://github.com/dandavison/delta
|
|
||||||
core.pager = "${pkgs.delta}/bin/delta";
|
|
||||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
|
||||||
delta.navigate = true;
|
|
||||||
merge.conflictStyle = "diff3";
|
|
||||||
diff.colorMoved = "default";
|
|
||||||
};
|
};
|
||||||
|
ignores = config.niveum.ignore;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
101
configs/haskell/packages.nix
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
haskellPackages:
|
||||||
|
with haskellPackages; [
|
||||||
|
blessings
|
||||||
|
scanner
|
||||||
|
HTTP
|
||||||
|
HUnit
|
||||||
|
MissingH
|
||||||
|
QuickCheck
|
||||||
|
ad
|
||||||
|
adjunctions
|
||||||
|
aeson
|
||||||
|
# algebra
|
||||||
|
ansi-terminal
|
||||||
|
async
|
||||||
|
attoparsec
|
||||||
|
base-orphans
|
||||||
|
bifunctors
|
||||||
|
binary
|
||||||
|
blaze-html
|
||||||
|
blaze-markup
|
||||||
|
brick
|
||||||
|
bytes
|
||||||
|
bytestring
|
||||||
|
case-insensitive
|
||||||
|
cassava
|
||||||
|
cereal
|
||||||
|
clock
|
||||||
|
comonad
|
||||||
|
comonad-transformers
|
||||||
|
conduit
|
||||||
|
conduit-extra
|
||||||
|
constraints
|
||||||
|
containers
|
||||||
|
contravariant
|
||||||
|
criterion
|
||||||
|
data-default
|
||||||
|
diagrams
|
||||||
|
directory
|
||||||
|
dlist
|
||||||
|
either
|
||||||
|
exceptions
|
||||||
|
extra
|
||||||
|
filepath
|
||||||
|
foundation
|
||||||
|
free
|
||||||
|
haskeline
|
||||||
|
hedgehog
|
||||||
|
hourglass
|
||||||
|
hspec
|
||||||
|
http-client
|
||||||
|
http-conduit
|
||||||
|
kan-extensions
|
||||||
|
lens
|
||||||
|
linear
|
||||||
|
lucid
|
||||||
|
megaparsec
|
||||||
|
microlens
|
||||||
|
monad-logger
|
||||||
|
mono-traversable
|
||||||
|
mtl
|
||||||
|
network
|
||||||
|
pandoc
|
||||||
|
parallel
|
||||||
|
parsec
|
||||||
|
persistent
|
||||||
|
pipes
|
||||||
|
pointed
|
||||||
|
pretty-show
|
||||||
|
primitive
|
||||||
|
process
|
||||||
|
profunctors
|
||||||
|
regex-tdfa
|
||||||
|
safe
|
||||||
|
scalpel
|
||||||
|
semigroupoids
|
||||||
|
semigroups
|
||||||
|
servant
|
||||||
|
servant-blaze
|
||||||
|
servant-client
|
||||||
|
servant-docs
|
||||||
|
servant-server
|
||||||
|
servant-swagger
|
||||||
|
split
|
||||||
|
stm
|
||||||
|
tagsoup
|
||||||
|
tasty
|
||||||
|
text
|
||||||
|
time
|
||||||
|
transformers
|
||||||
|
turtle
|
||||||
|
type-unary
|
||||||
|
unix-time
|
||||||
|
unordered-containers
|
||||||
|
vector
|
||||||
|
vinyl
|
||||||
|
void
|
||||||
|
vty
|
||||||
|
warp
|
||||||
|
wreq
|
||||||
|
yaml
|
||||||
|
]
|
||||||
@@ -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,90 +1,43 @@
|
|||||||
{ 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>);
|
||||||
};
|
};
|
||||||
hu-berlin-cifs-options = [
|
eduroamAuth = ''
|
||||||
"uid=${toString config.users.users.me.uid}"
|
key_mgmt=WPA-EAP
|
||||||
"gid=${toString config.users.groups.users.gid}"
|
eap=TTLS
|
||||||
"sec=ntlmv2"
|
proto=RSN
|
||||||
"workgroup=german"
|
identity="${eduroam.identity}"
|
||||||
"username=meinhaki"
|
anonymous_identity="anonymous@wlan.hu-berlin.de"
|
||||||
"password=${lib.strings.fileContents <secrets/mail/meinhaki>}"
|
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
|
||||||
"noauto"
|
password="${eduroam.password}"
|
||||||
"x-systemd.requires=hu-vpn.service"
|
ca_cert="${pkgs.fetchurl {
|
||||||
"x-systemd.automount"
|
url = https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem;
|
||||||
"x-systemd.device-timeout=1"
|
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
||||||
"x-systemd.idle-timeout=1min"
|
}}"
|
||||||
];
|
phase2="auth=PAP"
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
fileSystems."/media/hu-berlin/germpro2" = {
|
networking.wireless.networks = {
|
||||||
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
|
eduroam_5GHz.auth = eduroamAuth;
|
||||||
fsType = "cifs";
|
eduroam.auth = eduroamAuth;
|
||||||
options = hu-berlin-cifs-options;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/media/hu-berlin/germhome" = {
|
services.openvpn.servers = {
|
||||||
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
|
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";
|
||||||
|
}}
|
||||||
home-manager.users.me.programs.ssh = {
|
# route-nopull
|
||||||
matchBlocks = {
|
# route 141.20.0.0 255.255.0.0
|
||||||
"alew.hu-berlin.de" = {
|
'';
|
||||||
user = "centos";
|
authUserPass = {
|
||||||
hostname = "141.20.187.219";
|
username = eduroam.identity;
|
||||||
|
password = eduroam.password;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writers.writeDashBin "hu-ip" ''
|
|
||||||
${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writePython3Bin "hu-eduroam-install"
|
|
||||||
{
|
|
||||||
libraries = with pkgs.python3Packages; [ distro pyopenssl dbus-python ];
|
|
||||||
flakeIgnore = [ "E501" "E123" "W504" "E722" "F821" "E226" "E126" "E265" "W291" ];
|
|
||||||
}
|
|
||||||
(builtins.readFile (builtins.fetchurl {
|
|
||||||
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/linux-installer/eduroam-linux-hub.py";
|
|
||||||
sha256 = "19x2kvwxx13265b2hj5fjf53g0liw6dw7xf9j9cav67cswmz60kf";
|
|
||||||
}))
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.hu-vpn = {
|
|
||||||
enable = true;
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
conflicts = [ "openvpn-hu-berlin.service" ];
|
|
||||||
script = ''
|
|
||||||
${pkgs.openfortivpn}/bin/openfortivpn -c ${pkgs.writeText "hu-berlin.config" ''
|
|
||||||
host = forti-ssl.vpn.hu-berlin.de
|
|
||||||
port = 443
|
|
||||||
trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359
|
|
||||||
username = ${eduroam.identity}@split_tunnel
|
|
||||||
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";
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
332
configs/i3.nix
@@ -1,143 +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
|
|
||||||
'';
|
|
||||||
"curl" = pkgs.writers.writeDash "curl" ''
|
|
||||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
|
||||||
'';
|
|
||||||
ocr = pkgs.writers.writeDash "ocr" ''
|
|
||||||
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
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;
|
||||||
@@ -148,119 +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}+z" = "sticky toggle";
|
|
||||||
"${modifier}+Shift+z" = "floating toggle";
|
|
||||||
|
|
||||||
"${modifier}+s" = "scratchpad show";
|
|
||||||
"${modifier}+Shift+s" = "move scratchpad";
|
|
||||||
|
|
||||||
"${modifier}+c" = "split h";
|
|
||||||
"${modifier}+e" = "layout toggle split";
|
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
|
||||||
"${modifier}+r" = "mode resize";
|
"${modifier}+r" = "mode resize";
|
||||||
|
"${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}";
|
|
||||||
"${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}+d" = "exec ${pkgs.writers.writeDash "run" ''exec ${pkgs.rofi}/bin/rofi -modi run,window,ssh,filebrowser -show run''}";
|
|
||||||
"${modifier}+Shift+d" = "exec ${
|
|
||||||
pkgs.writers.writeDash "notemenu" ''
|
|
||||||
set -efu
|
|
||||||
PATH=$PATH:${
|
|
||||||
lib.makeBinPath [ pkgs.rofi pkgs.findutils pkgs.coreutils ]
|
|
||||||
}
|
|
||||||
|
|
||||||
cd ~/notes
|
|
||||||
note_file=$({
|
|
||||||
echo diary/$(date -I).md
|
|
||||||
echo diary/$(date -I -d yesterday).md
|
|
||||||
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2
|
|
||||||
} | rofi -dmenu -i -p 'notes')
|
|
||||||
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-once";
|
|
||||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||||
"XF86Calculator" = "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
|
|
||||||
"XF86AudioPause" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause";
|
|
||||||
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
|
|
||||||
"XF86AudioNext" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
|
|
||||||
"XF86AudioPrev" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
|
|
||||||
"XF86AudioStop" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl stop";
|
|
||||||
"XF86ScreenSaver" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
|
||||||
|
|
||||||
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
|
|
||||||
|
|
||||||
# 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 = {
|
||||||
|
|||||||
9
configs/keybase.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services.keybase.enable = true;
|
||||||
|
|
||||||
|
services.kbfs = {
|
||||||
|
enable = true;
|
||||||
|
mountPoint = "%h/cloud/keybase";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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";
|
|
||||||
}
|
}
|
||||||
|
|||||||
168
configs/khal.nix
@@ -1,168 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
davHome = "~/.local/share/dav";
|
|
||||||
kmeinCloud = {
|
|
||||||
davEndpoint = "https://cloud.xn--kiern-0qa.de/remote.php/dav";
|
|
||||||
username = "kieran";
|
|
||||||
password = lib.fileContents <secrets/nextcloud/password>;
|
|
||||||
};
|
|
||||||
fysiCloud = {
|
|
||||||
davEndpoint = "https://nextcloud.fysi.dev/remote.php/dav";
|
|
||||||
username = "kmein";
|
|
||||||
password = lib.fileContents <secrets/nextcloud-fysi/password>;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman ];
|
|
||||||
|
|
||||||
systemd.user.services.vdirsyncer = {
|
|
||||||
enable = true;
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
startAt = "*:00/10";
|
|
||||||
script = ''
|
|
||||||
${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
|
||||||
${pkgs.khal}/bin/khal printcalendars # https://lostpackets.de/khal/configure.html#syncing
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
xdg.configFile = {
|
|
||||||
"khard/khard.conf".text = ''
|
|
||||||
[addressbooks]
|
|
||||||
[[contacts]]
|
|
||||||
path = ${davHome}/contacts/contacts/
|
|
||||||
|
|
||||||
[general]
|
|
||||||
debug = no
|
|
||||||
default_action = list
|
|
||||||
editor = ${config.environment.variables.EDITOR}
|
|
||||||
merge_editor = ${pkgs.vim}/bin/vimdiff
|
|
||||||
|
|
||||||
[contact table]
|
|
||||||
display = first_name
|
|
||||||
group_by_addressbook = no
|
|
||||||
reverse = no
|
|
||||||
show_nicknames = no
|
|
||||||
show_uids = no
|
|
||||||
sort = last_name
|
|
||||||
localize_dates = yes
|
|
||||||
preferred_phone_number_type = pref, cell, home
|
|
||||||
preferred_email_address_type = pref, work, home
|
|
||||||
|
|
||||||
[vcard]
|
|
||||||
search_in_source_files = no
|
|
||||||
skip_unparsable = no
|
|
||||||
'';
|
|
||||||
|
|
||||||
"todoman/config.py".text = ''
|
|
||||||
path = "${davHome}/calendar/*"
|
|
||||||
date_format = "%Y-%m-%d"
|
|
||||||
time_format = "%H:%M"
|
|
||||||
default_due = 0
|
|
||||||
default_list = "Personal"
|
|
||||||
startable = True
|
|
||||||
'';
|
|
||||||
|
|
||||||
"khal/config".text = ''
|
|
||||||
[calendars]
|
|
||||||
|
|
||||||
[[alew]]
|
|
||||||
path = ${davHome}/calendar/alew
|
|
||||||
color = "light gray"
|
|
||||||
|
|
||||||
[[personal]]
|
|
||||||
path = ${davHome}/calendar/personal
|
|
||||||
color = "light cyan"
|
|
||||||
|
|
||||||
[[uni]]
|
|
||||||
path = ${davHome}/calendar/uni-1
|
|
||||||
color = "yellow"
|
|
||||||
|
|
||||||
[[fysi]]
|
|
||||||
path = ${davHome}/calendar/fysi-1
|
|
||||||
color = "light magenta"
|
|
||||||
|
|
||||||
[[fysi_team]]
|
|
||||||
path = ${davHome}/calendar/personal_shared_by_fdf
|
|
||||||
color = "light red"
|
|
||||||
|
|
||||||
[[birthdays]]
|
|
||||||
path = ${davHome}/contacts/contacts
|
|
||||||
type = birthdays
|
|
||||||
color = "light green"
|
|
||||||
|
|
||||||
[default]
|
|
||||||
highlight_event_days = True
|
|
||||||
timedelta = 5d
|
|
||||||
print_new = path
|
|
||||||
default_calendar = personal
|
|
||||||
|
|
||||||
[locale]
|
|
||||||
timeformat = %H:%M
|
|
||||||
dateformat = %Y-%m-%d
|
|
||||||
longdateformat = %Y-%m-%d
|
|
||||||
datetimeformat = %Y-%m-%d %H:%M
|
|
||||||
longdatetimeformat = %Y-%m-%d %H:%M
|
|
||||||
local_timezone = ${config.time.timeZone}
|
|
||||||
default_timezone = ${config.time.timeZone}
|
|
||||||
weeknumbers = left
|
|
||||||
'';
|
|
||||||
|
|
||||||
"vdirsyncer/config".text = ''
|
|
||||||
[general]
|
|
||||||
status_path = "~/.local/share/vdirsyncer/status/"
|
|
||||||
|
|
||||||
[pair kontakte]
|
|
||||||
a = "kontakte_local"
|
|
||||||
b = "kontakte_cloud"
|
|
||||||
collections = ["contacts"]
|
|
||||||
conflict_resolution = "b wins"
|
|
||||||
|
|
||||||
[pair kalender]
|
|
||||||
a = "kalender_local"
|
|
||||||
b = "kalender_cloud"
|
|
||||||
collections = ["personal", "alew", "uni-1"]
|
|
||||||
conflict_resolution = "b wins"
|
|
||||||
|
|
||||||
[pair fysi]
|
|
||||||
a = "kalender_local"
|
|
||||||
b = "fysi_cloud"
|
|
||||||
collections = ["fysi-1", "personal_shared_by_fdf"]
|
|
||||||
conflict_resolution = "b wins"
|
|
||||||
|
|
||||||
[storage kontakte_local]
|
|
||||||
type = "filesystem"
|
|
||||||
path = "${davHome}/contacts/"
|
|
||||||
fileext = ".vcf"
|
|
||||||
|
|
||||||
[storage kalender_local]
|
|
||||||
type = "filesystem"
|
|
||||||
path = "${davHome}/calendar/"
|
|
||||||
fileext = ".ics"
|
|
||||||
|
|
||||||
[storage kontakte_cloud]
|
|
||||||
type = "carddav"
|
|
||||||
url = "${kmeinCloud.davEndpoint}/addressbooks/users/${kmeinCloud.username}/"
|
|
||||||
username = "${kmeinCloud.username}"
|
|
||||||
password = "${kmeinCloud.password}"
|
|
||||||
|
|
||||||
[storage kalender_cloud]
|
|
||||||
type = "caldav"
|
|
||||||
url = "${kmeinCloud.davEndpoint}/calendars/${kmeinCloud.username}/"
|
|
||||||
username = "${kmeinCloud.username}"
|
|
||||||
password = "${kmeinCloud.password}"
|
|
||||||
|
|
||||||
[storage fysi_cloud]
|
|
||||||
type = "caldav"
|
|
||||||
url = "${fysiCloud.davEndpoint}/calendars/${fysiCloud.username}/"
|
|
||||||
username = "${fysiCloud.username}"
|
|
||||||
password = "${fysiCloud.password}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
systemd.services.lb-subscription = {
|
|
||||||
enable = true;
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
startAt = "weekly";
|
|
||||||
serviceConfig = {
|
|
||||||
user = "kfm";
|
|
||||||
WorkingDirectory = "/home/kfm/cloud/Seafile/Books/Germanistik/LB";
|
|
||||||
};
|
|
||||||
script = ''
|
|
||||||
first_year=2019
|
|
||||||
for year in $(${pkgs.coreutils}/bin/seq "$first_year" "$(date +%Y)"); do
|
|
||||||
${pkgs.curl}/bin/curl -sSL "https://www.literarische-blaetter.de/jahrgang-$year/" \
|
|
||||||
| ${pkgs.htmlq}/bin/htmlq --attribute href 'ul.slides a' \
|
|
||||||
| while read -r month; do
|
|
||||||
${pkgs.curl}/bin/curl -sSL "$month" \
|
|
||||||
| ${pkgs.htmlq}/bin/htmlq --attribute src iframe \
|
|
||||||
| ${pkgs.gnused}/bin/sed 's/.*?pdf=//;s/?wp-hosted.*//'
|
|
||||||
done
|
|
||||||
done | ${pkgs.findutils}/bin/xargs ${pkgs.wget}/bin/wget --no-clobber
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
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,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,75 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.nginx.virtualHosts.default = {
|
|
||||||
locations."= /stub_status".extraConfig = "stub_status;";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.prometheus = {
|
|
||||||
enable = true;
|
|
||||||
port = 9001;
|
|
||||||
exporters = {
|
|
||||||
nginx.enable = false;
|
|
||||||
node = {
|
|
||||||
enable = true;
|
|
||||||
enabledCollectors = [
|
|
||||||
"conntrack"
|
|
||||||
"diskstats"
|
|
||||||
"entropy"
|
|
||||||
"filefd"
|
|
||||||
"filesystem"
|
|
||||||
"loadavg"
|
|
||||||
"mdadm"
|
|
||||||
"meminfo"
|
|
||||||
"netdev"
|
|
||||||
"netstat"
|
|
||||||
"stat"
|
|
||||||
"time"
|
|
||||||
"vmstat"
|
|
||||||
"systemd"
|
|
||||||
"logind"
|
|
||||||
"interrupts"
|
|
||||||
"ksmd"
|
|
||||||
];
|
|
||||||
port = 9002;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ config.services.prometheus.exporters.node.port ];
|
|
||||||
|
|
||||||
systemd.services.promtail = {
|
|
||||||
description = "Promtail service for Loki";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.grafana-loki}/bin/promtail --config.file ${(pkgs.formats.yaml {}).generate "promtail.yaml" {
|
|
||||||
server = {
|
|
||||||
http_listen_port = 28183;
|
|
||||||
grpc_listen_port = 0;
|
|
||||||
};
|
|
||||||
positions.filename = "/tmp/positions.yaml";
|
|
||||||
clients = [
|
|
||||||
{ url = "http://${if config.networking.hostName == "makanek" then "127.0.0.1" else "makanek.r"}:3100/loki/api/v1/push"; }
|
|
||||||
];
|
|
||||||
scrape_configs = [
|
|
||||||
{
|
|
||||||
job_name = "journal";
|
|
||||||
journal = {
|
|
||||||
max_age = "12h";
|
|
||||||
labels.job = "systemd-journal";
|
|
||||||
labels.host = config.networking.hostName;
|
|
||||||
};
|
|
||||||
relabel_configs = [
|
|
||||||
{
|
|
||||||
source_labels = [ "__journal__systemd_unit" ];
|
|
||||||
target_label = "unit";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
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,28 +1,17 @@
|
|||||||
{ pkgs, lib, ... }: 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-raw-options = lib.concatStringsSep "," [ ''sub-lang="de,en"'' "write-sub=" "write-auto-sub=" ];
|
Alt+- add video-zoom -0.25
|
||||||
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
Alt+= add video-zoom 0.25
|
||||||
};
|
Alt+l add video-pan-x -0.05
|
||||||
bindings = {
|
Alt+h add video-pan-x 0.05
|
||||||
"Alt+RIGHT" = "add video-rotate 90";
|
Alt+k add video-pan-y 0.05
|
||||||
"Alt+LEFT" = "add video-rotate -90";
|
Alt+j add video-pan-y -0.05
|
||||||
"Alt+-" = "add video-zoom -0.25";
|
'';
|
||||||
"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";
|
|
||||||
};
|
|
||||||
scripts = [
|
|
||||||
pkgs.mpvScripts.youtube-quality
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
10
configs/nano.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
programs.nano.nanorc = ''
|
||||||
|
set autoindent
|
||||||
|
set boldtext
|
||||||
|
set morespace
|
||||||
|
set smarthome
|
||||||
|
set tabsize 4
|
||||||
|
set tabstospaces
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,248 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
mainMailbox = "posteo";
|
|
||||||
|
|
||||||
accounts.uni = {
|
|
||||||
user = "meinhark";
|
|
||||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
|
||||||
address = "kieran.felix.meinhardt@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.uni-old = {
|
|
||||||
user = "meinhark";
|
|
||||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
|
||||||
address = "meinhark@informatik.hu-berlin.de";
|
|
||||||
imap = "mailbox.informatik.hu-berlin.de";
|
|
||||||
smtp = "mailhost.informatik.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-uni = {
|
|
||||||
user = "meinhaki";
|
|
||||||
password = lib.strings.fileContents <secrets/mail/meinhaki>;
|
|
||||||
address = "kieran.meinhardt@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-fysi = rec {
|
|
||||||
user = "kieran@fysi.tech";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/fastmail>;
|
|
||||||
imap = "imap.fastmail.com";
|
|
||||||
smtp = "smtp.fastmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.cock = rec {
|
|
||||||
user = "2210@cock.li";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/cock>;
|
|
||||||
imap = "mail.cock.li";
|
|
||||||
smtp = imap;
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}:587";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts."${mainMailbox}" = rec {
|
|
||||||
user = "kieran.meinhardt@posteo.net";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/posteo>;
|
|
||||||
imap = "posteo.de";
|
|
||||||
smtp = imap;
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.google-amro = rec {
|
|
||||||
user = "amroplay@gmail.com";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/gmail/amroplay>;
|
|
||||||
imap = "imap.gmail.com";
|
|
||||||
smtp = "smtp.gmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "[Gmail]/Drafts";
|
|
||||||
sent = "[Gmail]/Sent Mail";
|
|
||||||
trash = "[Gmail]/Bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.google-kieran = rec {
|
|
||||||
user = "kieran.meinhardt@gmail.com";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/gmail/kieran.meinhardt>;
|
|
||||||
imap = "imap.gmail.com";
|
|
||||||
smtp = "smtp.gmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "[Gmail]/Entwürfe";
|
|
||||||
sent = "[Gmail]/Gesendet";
|
|
||||||
trash = "[Gmail]/Papierkorb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ pkgs.neomutt ];
|
|
||||||
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←";
|
|
||||||
|
|
||||||
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = ''
|
|
||||||
set mailcap_path = ${pkgs.writeText "mailcap" ''
|
|
||||||
text/plain; $EDITOR %s ;
|
|
||||||
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
|
|
||||||
image/*; ${pkgs.sxiv}/bin/sxiv %s ;
|
|
||||||
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
|
||||||
audio/*; ${pkgs.mpv}/bin/mpv %s ;
|
|
||||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
|
||||||
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
|
||||||
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
|
||||||
''}:$mailcap_path
|
|
||||||
|
|
||||||
set sidebar_visible
|
|
||||||
set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S"
|
|
||||||
set sidebar_width = 25 # Plenty of space
|
|
||||||
set sidebar_divider_char = '│' # Pretty line-drawing character
|
|
||||||
set mail_check_stats
|
|
||||||
|
|
||||||
set index_format="%2C %Z %D %-15.15L %s"
|
|
||||||
set date_format="%F %R"
|
|
||||||
|
|
||||||
set sort = 'reverse-date'
|
|
||||||
set sleep_time = 0 # Pause 0 seconds for informational messages
|
|
||||||
set markers = no # Disables the `+` displayed at line wraps
|
|
||||||
set mark_old = no # Unread mail stay unread until read
|
|
||||||
set wait_key = no # mutt won't ask "press key to continue"
|
|
||||||
set fast_reply # skip to compose when replying
|
|
||||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
|
||||||
set reverse_name # reply as whomever it was to
|
|
||||||
set include=ask-no # don't include message in replies
|
|
||||||
auto_view text/html # automatically show html (mailcap uses lynx)
|
|
||||||
auto_view application/pgp-encrypted
|
|
||||||
alternative_order text/plain text/enriched text/html
|
|
||||||
|
|
||||||
set abort_noattach abort_noattach_regex="\<(attach|attached|attachments?|anbei|Anhang|angehängt)\>"
|
|
||||||
set attach_save_dir=/tmp
|
|
||||||
set fast_reply
|
|
||||||
|
|
||||||
set narrow_tree # narrow threads for more depth
|
|
||||||
|
|
||||||
bind index,pager B sidebar-toggle-visible # Use 'B' to switch the Sidebar on and off
|
|
||||||
bind index,pager \Ck sidebar-prev
|
|
||||||
bind index,pager \Cj sidebar-next
|
|
||||||
bind index,pager \Co sidebar-open
|
|
||||||
bind index,pager \Cp sidebar-prev-new
|
|
||||||
bind index,pager \Cn sidebar-next-new
|
|
||||||
|
|
||||||
macro index * <limit>~F\r
|
|
||||||
macro index + <limit>all\r
|
|
||||||
|
|
||||||
set query_command = "khard email --parsable %s"
|
|
||||||
bind editor <Tab> complete-query
|
|
||||||
bind editor ^T complete
|
|
||||||
|
|
||||||
set mail_check = 90
|
|
||||||
set timeout = 15
|
|
||||||
# set imap_check_subscribed
|
|
||||||
set use_from
|
|
||||||
|
|
||||||
|
|
||||||
set header_cache="~/.cache/mutt" message_cachedir="~/.cache/mutt"
|
|
||||||
|
|
||||||
source ${pkgs.writeText "accounts.neomuttrc" ''
|
|
||||||
set realname = "Kierán Meinhardt"
|
|
||||||
account-hook . 'unset imap_user imap_pass smtp_user smtp_pass'
|
|
||||||
# set accordingly: postponed trash record
|
|
||||||
${lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: let imapRoot = "imaps://${account.user}@${account.imap}"; in ''
|
|
||||||
account-hook ${account.user}@${account.imap} 'set imap_user="${account.user}" imap_pass="${account.password}"'
|
|
||||||
account-hook ${account.user}@${account.smtp} 'set smtp_user="${account.user}" smtp_pass="${account.password}"'
|
|
||||||
folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"'
|
|
||||||
named-mailboxes "${name}←" "${imapRoot}" "${name}→" "${imapRoot}/${account.folders.sent}"
|
|
||||||
'') accounts)}
|
|
||||||
''}
|
|
||||||
|
|
||||||
set spoolfile="${mainMailbox}"
|
|
||||||
|
|
||||||
source ${pkgs.writeText "colors.neomuttrc" ''
|
|
||||||
# Default index colors:
|
|
||||||
color index_number blue default
|
|
||||||
color index red default '.*'
|
|
||||||
color index_flags lightcyan default '.*'
|
|
||||||
color index_author yellow default '.*'
|
|
||||||
color index_subject lightblack default '.*'
|
|
||||||
|
|
||||||
# New mail is boldened:
|
|
||||||
color index_author lightyellow black "~N"
|
|
||||||
color index_subject lightwhite black "~N"
|
|
||||||
|
|
||||||
# Flagged mail is highlighted:
|
|
||||||
color index_flags lightmagenta default '~F'
|
|
||||||
|
|
||||||
# Other colors and aesthetic settings:
|
|
||||||
mono bold bold
|
|
||||||
mono underline underline
|
|
||||||
mono error bold
|
|
||||||
mono indicator reverse
|
|
||||||
# color sidebar_flagged red black
|
|
||||||
mono sidebar_new bold
|
|
||||||
color error red default
|
|
||||||
color message cyan default
|
|
||||||
color search brightmagenta default
|
|
||||||
color hdrdefault lightblack default
|
|
||||||
color quoted green default
|
|
||||||
color quoted1 blue default
|
|
||||||
color quoted2 cyan default
|
|
||||||
color quoted3 yellow default
|
|
||||||
color quoted4 red default
|
|
||||||
color quoted5 brightred default
|
|
||||||
color signature lightblack default
|
|
||||||
color tree color235 default
|
|
||||||
|
|
||||||
# Regex highlighting:
|
|
||||||
color header red default "^(Date)"
|
|
||||||
color header yellow default "^(From)"
|
|
||||||
color header white default "^(B?CC)"
|
|
||||||
color header brightwhite default "^(Subject)"
|
|
||||||
color body cyan default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
|
||||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
|
||||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
|
||||||
color body red default "(BAD signature)|^gpg: BAD signature from.*"
|
|
||||||
color body brightgreen default "(Good signature)|^gpg: Good signature .*"
|
|
||||||
color body brightyellow default "^gpg: "
|
|
||||||
mono body bold "^gpg: Good signature"
|
|
||||||
mono body bold "^gpg: BAD signature from.*"
|
|
||||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,64 +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; [
|
||||||
ale
|
ale
|
||||||
|
deoplete-nvim
|
||||||
fzf-vim
|
fzf-vim
|
||||||
fzfWrapper
|
fzfWrapper
|
||||||
supertab
|
supertab
|
||||||
undotree
|
|
||||||
tabular
|
tabular
|
||||||
# vimwiki
|
vim-abolish
|
||||||
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-after vim-pandoc-syntax
|
||||||
vim-repeat
|
vim-repeat
|
||||||
vim-sensible
|
vim-sensible
|
||||||
|
vim-startify
|
||||||
vim-surround
|
vim-surround
|
||||||
|
(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
|
||||||
elm-vim
|
elm-vim
|
||||||
emmet-vim
|
|
||||||
haskell-vim
|
haskell-vim
|
||||||
icalendar-vim
|
idris-vim
|
||||||
jq-vim
|
|
||||||
rust-vim
|
rust-vim
|
||||||
typescript-vim
|
typescript-vim
|
||||||
vim-javascript
|
vim-javascript
|
||||||
vim-ledger
|
|
||||||
vim-nix
|
vim-nix
|
||||||
|
vim-toml
|
||||||
vimtex
|
vimtex
|
||||||
vim-pandoc
|
vim-ledger
|
||||||
vim-pandoc-syntax
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
vim-256noir
|
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,86 +0,0 @@
|
|||||||
{ lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
profile = name: custom: lib.recursiveUpdate {
|
|
||||||
connection.id = name;
|
|
||||||
connection.type = "wifi";
|
|
||||||
connection.interface-name = "wlp3s0";
|
|
||||||
connection.permissions = "";
|
|
||||||
wifi.mac-address-blacklist = "";
|
|
||||||
wifi.ssid = name;
|
|
||||||
wifi.mode = "infrastructure";
|
|
||||||
ipv4.dns-search = "";
|
|
||||||
ipv4.method = "auto";
|
|
||||||
ipv6.addr-gen-mode = "stable-privacy";
|
|
||||||
ipv6.dns-search = "";
|
|
||||||
ipv6.method = "auto";
|
|
||||||
proxy = {};
|
|
||||||
} custom;
|
|
||||||
eduroamProfile = {
|
|
||||||
connection.uuid = "eae9fee6-a7d2-4120-a609-440b457d6fcf";
|
|
||||||
wifi-security = {
|
|
||||||
group = "ccmp;tkip;";
|
|
||||||
key-mgmt = "wpa-eap";
|
|
||||||
pairwise = "ccmp;";
|
|
||||||
proto = "rsn;";
|
|
||||||
};
|
|
||||||
"802-1x" = {
|
|
||||||
altsubject-matches = "DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de;";
|
|
||||||
anonymous-identity = "anonymous@wlan.hu-berlin.de";
|
|
||||||
ca-cert = pkgs.fetchurl {
|
|
||||||
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
|
|
||||||
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
|
||||||
};
|
|
||||||
eap = "ttls;";
|
|
||||||
identity = lib.strings.fileContents <secrets/eduroam/identity>;
|
|
||||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
|
||||||
phase2-auth = "pap";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ <niveum/modules/networkmanager-declarative.nix> ];
|
|
||||||
|
|
||||||
networking.networkmanager = {
|
|
||||||
enable = true;
|
|
||||||
wifi.macAddress = "random";
|
|
||||||
ethernet.macAddress = "random";
|
|
||||||
unmanaged = [ "docker*" ];
|
|
||||||
profiles = lib.mapAttrs profile {
|
|
||||||
Aether = {
|
|
||||||
connection.uuid = "7138bb0f-1aeb-4905-890e-a6628427aa21";
|
|
||||||
ipv6.addr-gen-mode = "stable";
|
|
||||||
wifi.cloned-mac-address = "stable";
|
|
||||||
wifi-security = {
|
|
||||||
psk = lib.strings.fileContents <secrets/wifi/Aether.psk>;
|
|
||||||
auth-alg = "open";
|
|
||||||
key-mgmt = "wpa-psk";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
FactoryCommunityGuest = {
|
|
||||||
connection.uuid = "fb1f2e52-651e-48b5-a72c-1accddf31afb";
|
|
||||||
connection.timestamp = "1631885129";
|
|
||||||
wifi.seen-bssids = "54:EC:2F:19:30:DC;54:EC:2F:19:5C:9C;54:EC:2F:58:E4:3C;";
|
|
||||||
wifi-security = {
|
|
||||||
psk = "Factory4ever";
|
|
||||||
auth-alg = "open";
|
|
||||||
key-mgmt = "wpa-psk";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
o2-WLAN66 = {
|
|
||||||
connection.uuid = "c563aec3-f344-4ffb-8d1c-60a6cdac8fe0";
|
|
||||||
wifi-security = {
|
|
||||||
psk = "PK3468KV488T934U";
|
|
||||||
auth-alg = "open";
|
|
||||||
key-mgmt = "wpa-psk";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"WIFI@DB".connection.uuid = "4eff4e94-8850-4e9f-a338-1787d0d90479";
|
|
||||||
eduroam = eduroamProfile;
|
|
||||||
eduroam_5GHz = eduroamProfile;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.me.extraGroups = [ "networkmanager" ];
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.speedtest-cli ];
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
let
|
|
||||||
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
|
||||||
|
|
||||||
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
|
|
||||||
|
|
||||||
newsboat-home =
|
|
||||||
"${config.users.users.me.home}/cloud/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 "${youtube-download}" ; 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
|
|
||||||
(pkgs.writers.writeDashBin "mpv-watch-later" ''
|
|
||||||
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
|
|
||||||
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
|
||||||
config.allowUnfree = true;
|
|
||||||
overlays = [
|
|
||||||
(import <nix-writers/pkgs>)
|
|
||||||
(import <stockholm/krebs/5pkgs>)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nixUnstable;
|
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
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,264 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
|
||||||
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
|
||||||
menstruation = pkgs.callPackage <menstruation-backend> {};
|
|
||||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
|
||||||
|
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
|
||||||
|
|
||||||
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";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old: old // {
|
|
||||||
installPhase = ''
|
|
||||||
${old.installPhase}
|
|
||||||
# set sensible defaults
|
|
||||||
sed -i '
|
|
||||||
/^-z /s/8:00W/1:00E/ # timezone
|
|
||||||
/^-zl /s/122W19:59 47N36:35/13E22:42 52N27:42/ # default location
|
|
||||||
/^-zj /s/"Current moment now"/Now/ # default name
|
|
||||||
/^-zj /s/"Seattle, WA, USA"/Berlin/ # default location
|
|
||||||
/^_k/s/_k/=k/ # use color
|
|
||||||
/^_Yd/s/_Yd/=Yd/ # sensible date format
|
|
||||||
/^_Yt/s/_Yt/=Yt/ # sensible time format
|
|
||||||
/^_Yv/s/_Yv/=Yv/ # sensible length format
|
|
||||||
/^:Xbw/s/:Xbw/:Xbn/ # set X11 bitmap format
|
|
||||||
/^:I /s/80/120/ # wider text output
|
|
||||||
' $out/astrolog/astrolog.as
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
recht = pkgs.callPackage <recht> {};
|
|
||||||
|
|
||||||
in {
|
|
||||||
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; [
|
|
||||||
# INTERNET
|
|
||||||
aria2
|
|
||||||
firefox
|
|
||||||
tdesktop
|
|
||||||
w3m
|
|
||||||
wget
|
|
||||||
whois
|
|
||||||
dnsutils
|
|
||||||
# FILE MANAGERS
|
|
||||||
ranger
|
|
||||||
pcmanfm
|
|
||||||
# MEDIA
|
|
||||||
ffmpeg
|
|
||||||
imagemagick
|
|
||||||
exiftool
|
|
||||||
# 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
|
|
||||||
fd # better find
|
|
||||||
file # determine file type
|
|
||||||
dos2unix
|
|
||||||
ncdu # ncurses disk usage
|
|
||||||
python3Packages.jsonschema # json validation
|
|
||||||
jq # json toolkit
|
|
||||||
pup # html toolkit
|
|
||||||
htmlq
|
|
||||||
xsv # csv toolkit
|
|
||||||
xmlstarlet # xml toolkit
|
|
||||||
manpages
|
|
||||||
posix_man_pages
|
|
||||||
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
|
|
||||||
# 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
|
|
||||||
astrolog
|
|
||||||
anki # flashcards
|
|
||||||
jbofihe # lojbanic software
|
|
||||||
nixpkgs-unstable.zoom-us # video conferencing
|
|
||||||
pdfgrep # search in pdf
|
|
||||||
pdftk # pdf toolkit
|
|
||||||
mupdf
|
|
||||||
poppler_utils # pdf toolkit
|
|
||||||
foxitreader # for viewing pdf annotations
|
|
||||||
xournalpp # for annotating pdfs
|
|
||||||
pdfpc # presenter console for pdf slides
|
|
||||||
hc # print files as qr codes
|
|
||||||
youtubeDL
|
|
||||||
espeak
|
|
||||||
bc # calculator
|
|
||||||
pari # gp -- better calculator
|
|
||||||
scripts.auc
|
|
||||||
scripts.infschmv
|
|
||||||
scripts.qrpaste
|
|
||||||
scripts.ttspaste
|
|
||||||
scripts.new-mac # get a new mac address
|
|
||||||
scripts.scanned
|
|
||||||
scripts.default-gateway
|
|
||||||
scripts.showkeys-toggle
|
|
||||||
scripts.kirciuoklis
|
|
||||||
scripts.favicon
|
|
||||||
scripts.ipa # XSAMPA to IPA converter
|
|
||||||
scripts.playlist
|
|
||||||
scripts.mpv-tv
|
|
||||||
scripts.devanagari
|
|
||||||
scripts.betacode # ancient greek betacode to unicode converter
|
|
||||||
scripts.meteo
|
|
||||||
scripts.mahlzeit
|
|
||||||
recht
|
|
||||||
scripts.vimv
|
|
||||||
scripts.swallow # window swallowing
|
|
||||||
scripts.literature-quote
|
|
||||||
scripts.nav # json navigation
|
|
||||||
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.unicodmenu
|
|
||||||
scripts.horoscope
|
|
||||||
scripts.closest
|
|
||||||
scripts.trans
|
|
||||||
scripts.mpv-radio
|
|
||||||
# kmein.slide
|
|
||||||
scripts.tolino-screensaver
|
|
||||||
scripts.rfc
|
|
||||||
scripts.tag
|
|
||||||
scripts.timer
|
|
||||||
python3Packages.eyeD3
|
|
||||||
scripts.menu-calc
|
|
||||||
nix-prefetch-git
|
|
||||||
scripts.nix-git
|
|
||||||
nixfmt
|
|
||||||
par
|
|
||||||
qrencode
|
|
||||||
|
|
||||||
menstruation
|
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "worldradio" ''
|
|
||||||
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
|
||||||
'')
|
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "chats" ''
|
|
||||||
${pkgs.openssh}/bin/ssh makanek "cd /var/lib/weechat/logs && grep --ignore-case --color=always --recursive $@" | ${pkgs.less}/bin/less --raw-control-chars
|
|
||||||
'')
|
|
||||||
|
|
||||||
(pkgs.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
|
|
||||||
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import <niveum/lib/local-network.nix>).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
|
|
||||||
|
|
||||||
spotify
|
|
||||||
ncspot
|
|
||||||
playerctl
|
|
||||||
|
|
||||||
nix-index
|
|
||||||
scripts.nix-index-update
|
|
||||||
|
|
||||||
#krebs
|
|
||||||
dic
|
|
||||||
cyberlocker-tools
|
|
||||||
untilport
|
|
||||||
kpaste
|
|
||||||
irc-announce
|
|
||||||
git-preview
|
|
||||||
ircaids
|
|
||||||
|
|
||||||
(python3.withPackages (py: [
|
|
||||||
py.black
|
|
||||||
# py.python-language-server
|
|
||||||
# py.pyls-mypy
|
|
||||||
# py.pyls-black
|
|
||||||
# py.pyls-isort
|
|
||||||
py.flake8
|
|
||||||
py.pygments
|
|
||||||
py.schema
|
|
||||||
]))
|
|
||||||
python3Packages.poetry
|
|
||||||
|
|
||||||
htmlTidy
|
|
||||||
nodePackages.csslint
|
|
||||||
nodePackages.jsonlint
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.typescript
|
|
||||||
nodePackages.yarn
|
|
||||||
nodejs
|
|
||||||
nodePackages.javascript-typescript-langserver
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
latexrun
|
|
||||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
|
||||||
# haskellPackages.pandoc-citeproc
|
|
||||||
scripts.text2pdf
|
|
||||||
lowdown
|
|
||||||
glow # markdown to term
|
|
||||||
libreoffice
|
|
||||||
# gnumeric
|
|
||||||
dia
|
|
||||||
pandoc
|
|
||||||
pandoc-doc
|
|
||||||
# proselint
|
|
||||||
asciidoctor
|
|
||||||
wordnet
|
|
||||||
tokei # count lines of code
|
|
||||||
gnumake
|
|
||||||
binutils # for strip, ld, ...
|
|
||||||
# nightly.rust
|
|
||||||
shellcheck
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
|
||||||
[pycodestyle]
|
|
||||||
max-line-length = 110
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
||||||
107
configs/packages/default.nix
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./krebs.nix
|
||||||
|
./programming.nix
|
||||||
|
./writing.nix
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
] ++ [ # internet
|
||||||
|
aria2
|
||||||
|
firefox
|
||||||
|
tor-browser-bundle-bin
|
||||||
|
thunderbird
|
||||||
|
tdesktop
|
||||||
|
w3m
|
||||||
|
wget
|
||||||
|
httpie
|
||||||
|
whois
|
||||||
|
ddgr
|
||||||
|
python3Packages.instaloader
|
||||||
|
mtr # my traceroute
|
||||||
|
] ++ [ # media
|
||||||
|
ffmpeg
|
||||||
|
imagemagick
|
||||||
|
sxiv
|
||||||
|
] ++ [ # archive
|
||||||
|
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
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
19
configs/packages/krebs.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let krebs-packages = pkgs: {
|
||||||
|
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> {};
|
||||||
|
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> {};
|
||||||
|
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
|
||||||
|
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
|
||||||
|
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
|
||||||
|
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> {};
|
||||||
|
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> {};
|
||||||
|
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> {};
|
||||||
|
bepasty-client-cli = pkgs.callPackage <stockholm/krebs/5pkgs/simple/bepasty-client-cli> {};
|
||||||
|
irc-announce = pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> {};
|
||||||
|
git-preview = pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> {};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
nixpkgs.config.packageOverrides = krebs-packages;
|
||||||
|
|
||||||
|
environment.systemPackages = map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs));
|
||||||
|
}
|
||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
17
configs/packages/writing.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(texlive.combine {
|
||||||
|
inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo;
|
||||||
|
pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo";
|
||||||
|
})
|
||||||
|
# haskellPackages.patat
|
||||||
|
(aspellWithDicts (dict: [dict.de dict.en dict.la dict.en-computers dict.ru]))
|
||||||
|
haskellPackages.pandoc-citeproc
|
||||||
|
libreoffice
|
||||||
|
pandoc
|
||||||
|
proselint
|
||||||
|
unstable.asciidoctor
|
||||||
|
wordnet
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
user = config.users.users.me.name;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
security.polkit.extraConfig = ''
|
|
||||||
polkit.addRule(function(action, subject) {
|
|
||||||
if (subject.user == "${user}" && action.id == "org.freedesktop.systemd1.manage-units") {
|
|
||||||
return polkit.Result.YES;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -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}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,33 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
{
|
||||||
inherit (import <niveum/lib>) localAddresses;
|
|
||||||
hp-driver = pkgs.hplipWithPlugin;
|
|
||||||
in {
|
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [ hp-driver ];
|
drivers = [ pkgs.hplipWithPlugin ];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane = {
|
networking.hosts."192.168.178.27" = [ "officejet" ];
|
||||||
enable = true;
|
|
||||||
extraBackends = [ hp-driver ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.printers.ensurePrinters = [{
|
|
||||||
name = "OfficeJet";
|
|
||||||
location = "Zimmer";
|
|
||||||
deviceUri = "https://${localAddresses.officejet}";
|
|
||||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
|
||||||
ppdOptions = {
|
|
||||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
|
||||||
PageSize = "A4"; # A4 A4.FB A4.Duplex
|
|
||||||
MediaType = "Plain";
|
|
||||||
OutputMode = "Normal";
|
|
||||||
ColorModel = "KGray"; # RGB CMYGray KGray
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HP/hp-officejet_4650_series.ppd.gz
|
|
||||||
drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd
|
|
||||||
*/
|
|
||||||
|
|||||||
28
configs/python.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ 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.flask
|
||||||
|
py.pygments
|
||||||
|
py.docopt
|
||||||
|
py.schema
|
||||||
|
py.ansicolors
|
||||||
|
py.virtualenv
|
||||||
|
py.spacy
|
||||||
|
py.spacy_models
|
||||||
|
])
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.xdg.configFile."pycodestyle".text = ''
|
||||||
|
[pycodestyle]
|
||||||
|
max-line-length = 110
|
||||||
|
'';
|
||||||
|
}
|
||||||
9
configs/random-background.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
home-manager.users.me = {
|
||||||
|
services.random-background = {
|
||||||
|
enable = true;
|
||||||
|
imageDirectory = toString <art>;
|
||||||
|
interval = "2h";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1 +1,7 @@
|
|||||||
{ services.redshift.enable = false; }
|
{
|
||||||
|
services.redshift = {
|
||||||
|
enable = true;
|
||||||
|
latitude = "52";
|
||||||
|
longitude = "13";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,37 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }:
|
||||||
imports = [
|
{
|
||||||
<niveum/modules/retiolum.nix>
|
imports = [ <modules/retiolum.nix> ];
|
||||||
];
|
|
||||||
|
|
||||||
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
|
fileSystems."/mnt/lassulusflix" = {
|
||||||
|
device = "prism.r:/export";
|
||||||
|
fsType = "nfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hosts = {
|
||||||
|
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.retiolum = {
|
||||||
|
scardanelli = {
|
||||||
|
ipv4 = "10.243.2.2";
|
||||||
|
ipv6 = "42:0:3c46:4007:5bce:f1bc:606b:2b18";
|
||||||
|
};
|
||||||
|
homeros = {
|
||||||
|
ipv4 = "10.243.2.1";
|
||||||
|
ipv6 = "42:0:3c46:53e:e63d:e62a:56ea:c705";
|
||||||
|
};
|
||||||
|
catullus = {
|
||||||
|
ipv4 = "10.243.2.3";
|
||||||
|
ipv6 = "42:0:3c46:3ec0:7aad:d1d5:9842:da4c";
|
||||||
|
};
|
||||||
|
wilde = {
|
||||||
|
ipv4 = "10.243.2.4";
|
||||||
|
ipv6 = "42:0:3c46:907c:1fb8:b74f:c59b:1ee3";
|
||||||
|
};
|
||||||
|
}.${config.networking.hostName};
|
||||||
|
|
||||||
|
environment.etc."tinc/retiolum/rsa_key.priv" = {
|
||||||
|
text = builtins.readFile <secrets/retiolum.key>;
|
||||||
|
mode = "400";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||