mirror of
https://github.com/kmein/niveum
synced 2026-03-29 08:41:07 +02:00
Compare commits
207 Commits
f8a3bfe21e
...
flakes
| Author | SHA1 | Date | |
|---|---|---|---|
| 06c1be9e09 | |||
| d5087c40b2 | |||
| 23fb65ce1e | |||
| c49a5a4187 | |||
| 42df2c032e | |||
| 86d6943dd2 | |||
| 6f10cd277d | |||
| 869c6e6a08 | |||
| 5b131a5a30 | |||
| 0423429e02 | |||
| f451cc5028 | |||
| 8f9e8db71e | |||
| 81e6b5c9f6 | |||
| 50d8788088 | |||
| 805b46ffb1 | |||
| bc9217ba3e | |||
| db2ec25bc1 | |||
| 33b960143b | |||
| f02225d1e9 | |||
| 9c2e2df05a | |||
| aaeef41f55 | |||
| 0787da719e | |||
| e225a7d451 | |||
| 9d3b29add2 | |||
| 5792224240 | |||
| ecadc12c9f | |||
| 4ecc34b63e | |||
| 48e2be7427 | |||
| 296a3a9c9f | |||
| 0136215a4a | |||
| dd8a885e81 | |||
| e755ee06e2 | |||
| 5ade0a7011 | |||
| bed0795a04 | |||
| 31d59aba6a | |||
| 08c04462a7 | |||
| 7d00a2e896 | |||
| 1027a850fb | |||
| 314134d861 | |||
| 143b2f1a06 | |||
| 02cc600c68 | |||
| 25c48354f7 | |||
| 5b2c2c7709 | |||
| e55cc77825 | |||
| 8a45abae35 | |||
| e046c74539 | |||
| 9dae3e2d1a | |||
| 0fea7ba938 | |||
| edcbe19fb2 | |||
| ee573e13fc | |||
| 83d23f8b55 | |||
| addd7077ed | |||
| ec175ef3d7 | |||
| a7a103c853 | |||
| 2105a5a0fe | |||
| d5a71770a6 | |||
| bff6ede4c1 | |||
| 5a82328b37 | |||
| b3871ba6aa | |||
| 9b68ac87d8 | |||
| bbc50f3642 | |||
| fc067a8493 | |||
| 4ac499530d | |||
| 078b3f6183 | |||
| ca0267ce22 | |||
| 10d003371e | |||
| 33da8389f5 | |||
| 707e1f1565 | |||
| 312dd27f02 | |||
| 5a0f6d3035 | |||
| 77bd1116ea | |||
| 8d4362d903 | |||
| bc4e25a42d | |||
| 96627b6f50 | |||
| 6f2a824d8b | |||
| a65a4b28da | |||
| 41f87bdc37 | |||
| 85ab948ccd | |||
| 9f834e742e | |||
| 416d3ab277 | |||
| 82b9bb2a4c | |||
| 82b650bdbf | |||
| 06125303b8 | |||
| c0efacd6ce | |||
| 2aff28c6ed | |||
| e27db27fd8 | |||
| 683bd2f3be | |||
| 01e3cef34f | |||
| f921d3d3b6 | |||
| ffa3f820ce | |||
| 8738cb4a58 | |||
| a2b706e787 | |||
| 22247715a3 | |||
| bdd4bda339 | |||
| 1002fd8b43 | |||
| 1f48644558 | |||
| da95622df1 | |||
| e275c81257 | |||
| bf7d0165b1 | |||
| cb10b423dc | |||
| a93a34e546 | |||
| c7603af4d0 | |||
| dd685afb7c | |||
| 055b4016e6 | |||
| f361d2b877 | |||
| 8b00faf762 | |||
| f7d72e00b6 | |||
| 087c138906 | |||
| bf8f6d8d52 | |||
| fcf2aa4cca | |||
| 48484514bc | |||
| aa359ad986 | |||
| 2432b0bbaa | |||
| 2b754d4a5b | |||
| f38e5c3295 | |||
| f6b4740b73 | |||
| c06fb3f50c | |||
| 4ae2fa4a6a | |||
| 6809db5ccc | |||
| c9fb802c55 | |||
| 2f4505d29b | |||
| b43de46611 | |||
| 3545c37084 | |||
| 043fe3b67b | |||
| f0779c45c3 | |||
| b7a6fda046 | |||
| e431e0bf03 | |||
| ac54cd5eaf | |||
| 4bd5965915 | |||
| f21112465b | |||
| b989684f12 | |||
| beef73daab | |||
| de3fbfd356 | |||
| a1e88e30a7 | |||
| c50698f275 | |||
| 6119c0dbcc | |||
| 7dd5a9e269 | |||
| 2384a4eef5 | |||
| f6ffd477d1 | |||
| 77fc7e4832 | |||
| 76d75048fa | |||
| 71e65461cf | |||
| 6545b016c5 | |||
| 6eff3d831c | |||
| 80abae0daa | |||
| bbdef3a8ed | |||
| 1f28eb000d | |||
| fb7a295310 | |||
| ad84e0445d | |||
| faac180148 | |||
| 2691608f8c | |||
| 9678ba7b28 | |||
| dc90c4c6ab | |||
| 4c2a4df663 | |||
| c60e90f001 | |||
| d0f1287c68 | |||
| f91004fff6 | |||
| adca14865c | |||
| 4cdf954732 | |||
| e2bd211d4b | |||
| d04c652f61 | |||
| f036e50210 | |||
| 8b8fbeb511 | |||
| 04b40f15e2 | |||
| 70755b3cec | |||
| 3ebd71971d | |||
| ca51f06e2a | |||
| 0e9051aaaa | |||
| d1079fe413 | |||
| 6418b03548 | |||
| ecdfd7953d | |||
| 08ab96c0db | |||
| 5939219f8c | |||
| e2f82c3da8 | |||
| 0dc43c2eff | |||
| 136b04cb3f | |||
| 8af855585b | |||
| 4136e7bf3f | |||
| c365f5f8b2 | |||
| d37393b1ca | |||
| b484f424af | |||
| 15e2cd7e4f | |||
| a88a0f57c2 | |||
| 4d81f0b0ac | |||
| 0971a2c575 | |||
| 18c829f224 | |||
| 865b0b736c | |||
| 84613b8d51 | |||
| 7fcf265ffd | |||
| 5892702841 | |||
| 233fa97da5 | |||
| aeda9e63e6 | |||
| 80d9a1b41c | |||
| 40fd40453f | |||
| 8beb632b1e | |||
| 83c9b0e30c | |||
| 8471f7e1e2 | |||
| 8ff3cab263 | |||
| 321eb82116 | |||
| 9d0dc4397c | |||
| 6ab4332965 | |||
| f00d903043 | |||
| cb1f3ce4f1 | |||
| d3e3bf92eb | |||
| 60e44ae4eb | |||
| 9bc3279f52 | |||
| 2f75f4c3b3 |
46
.bin/bvg.sh
Executable file
46
.bin/bvg.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/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")
|
||||
))
|
||||
'
|
||||
14
.bin/csv2json
Executable file
14
.bin/csv2json
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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)
|
||||
7
.bin/elm-publish-private
Executable file
7
.bin/elm-publish-private
Executable file
@@ -0,0 +1,7 @@
|
||||
#! /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 "$@"
|
||||
24
.bin/json2csv
Executable file
24
.bin/json2csv
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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)
|
||||
15
.bin/libib.sh
Executable file
15
.bin/libib.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
session_id=7b638c194d9bda74f80043045018cc9e
|
||||
|
||||
declare -A libraries
|
||||
|
||||
libraries["Literatur"]=344428
|
||||
libraries["Sprache"]=344160
|
||||
libraries["Miscellanea"]=344427
|
||||
libraries["Wissenschaft"]=344429
|
||||
libraries["Relicta"]=565920
|
||||
|
||||
for library in ${!libraries[@]}
|
||||
do
|
||||
curl -sSL 'https://www.libib.com/library/functions/csv-export.php' -H "Cookie: PHPSESSID=$session_id" -d export="${libraries[$library]}" > "$library.csv"
|
||||
done
|
||||
17
.bin/lit.awk
Normal file
17
.bin/lit.awk
Normal file
@@ -0,0 +1,17 @@
|
||||
BEGIN {
|
||||
if (!comment) comment = "--";
|
||||
if (!begin) begin = "\\begin{code}";
|
||||
if (!end) end = "\\end{code}";
|
||||
}
|
||||
{
|
||||
if ($0 == begin) {
|
||||
code = 1;
|
||||
print comment, $0;
|
||||
} else if ($0 == end) {
|
||||
code = 0;
|
||||
print comment, $0;
|
||||
} else {
|
||||
if (code) print $0;
|
||||
else print comment, $0;
|
||||
}
|
||||
}
|
||||
6
.bin/sample-pdf.sh
Executable file
6
.bin/sample-pdf.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/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"
|
||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,3 +1,9 @@
|
||||
[submodule "submodules/much"]
|
||||
path = submodules/much
|
||||
url = git@github.com:kmein/much
|
||||
[submodule "submodules/menstruation-telegram"]
|
||||
path = submodules/menstruation-telegram
|
||||
url = https://github.com/kmein/menstruation-telegram
|
||||
[submodule "submodules/menstruation-backend"]
|
||||
path = submodules/menstruation-backend
|
||||
url = https://github.com/kmein/menstruation.rs
|
||||
[submodule "submodules/nur-packages"]
|
||||
path = submodules/nur-packages
|
||||
url = git@github.com:kmein/nur-packages.git
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/nix-community/home-manager.git",
|
||||
"rev": "35a24648d155843a4d162de98c17b1afd5db51e4",
|
||||
"date": "2021-06-21T00:35:57+02:00",
|
||||
"path": "/nix/store/8n5b5wcdn1cqrbly2pqkin8ihl8b2vpv-home-manager",
|
||||
"sha256": "06w327cvbqpi2fpl5rqk664vrl0ls0jqfkzx8vgvbcn1pmxsl0y3",
|
||||
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
|
||||
"date": "2021-12-19T00:59:29+01:00",
|
||||
"path": "/nix/store/fb46bv10azrag2jjlzhil6j11f4x8glw-home-manager",
|
||||
"sha256": "1c8gxm86zshr2zj9dvr02qs7y3m46gqavr6wyv01r09jfd99dxz9",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"date": "2021-03-23T22:47:37+01:00",
|
||||
"path": "/nix/store/mz13xxnil35lwsf90hwnrm2agir7hb51-krops",
|
||||
"sha256": "07mg3iaqjf1w49vmwfchi7b1w55bh7rvsbgicp2m47gnj9alwdb6",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
11
.versions/nix-writers.json
Normal file
11
.versions/nix-writers.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"url": "https://cgit.krebsco.de/nix-writers",
|
||||
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||
"date": "2019-04-02T20:05:33+02:00",
|
||||
"path": "/nix/store/wm5zhsha1a2iy0d582nlfi7604ayd1vz-nix-writers",
|
||||
"sha256": "0xdivaca1hgbxs79jw9sv4gk4f81vy8kcyaff56hh2dgq2awyvw4",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/mozilla/nixpkgs-mozilla",
|
||||
"rev": "3f3fba4e2066f28a1ad7ac60e86a688a92eb5b5f",
|
||||
"date": "2021-06-03T15:29:39+02:00",
|
||||
"path": "/nix/store/aklhz1c8gppv2wrf64haa92qdl77f0jg-nixpkgs-mozilla",
|
||||
"sha256": "1mrj89gzrzhci4lssvzmmk31l715cddp7l39favnfs1qaijly814",
|
||||
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
|
||||
"date": "2021-12-07T09:28:33-05:00",
|
||||
"path": "/nix/store/pqwcw589i2y2w2116wn3ifl834adjsa0-nixpkgs-mozilla",
|
||||
"sha256": "1a71nfw7d36vplf89fp65vgj3s66np1dc0hqnqgj5gbdnpm1bihl",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "270afc54e1520caa0f34dc0e8b01362ed31f2688",
|
||||
"date": "2021-07-24T08:10:06+02:00",
|
||||
"path": "/nix/store/00yafr704dy46gsx8m80nar6xpb4cp2k-nixpkgs",
|
||||
"sha256": "1hr52z3ixvivh1xa37x4qxmjqpw061c862m9492a0ys84cqmy6yw",
|
||||
"rev": "f01adc7b35a8f80e82f3466e6d873b8b9c8f1b28",
|
||||
"date": "2021-12-22T23:05:28+01:00",
|
||||
"path": "/nix/store/zhfrvg77dzpc3hq02v9zv20dfgqwpzk6-nixpkgs",
|
||||
"sha256": "17iyf2iiizi7c1wr71day3wvgalbkkm2zgc9lpy7y42rl4frq9sf",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "63ee5cd99a2e193d5e4c879feb9683ddec23fa03",
|
||||
"date": "2021-07-20T22:32:07-04:00",
|
||||
"path": "/nix/store/rqj8dz1bwh8ybhz26ixsr3q3zkarr81f-nixpkgs",
|
||||
"sha256": "0avbsx5chbwr0y55shndkzf0ixx3bznbzq526p5nj8llryxa10af",
|
||||
"rev": "9ab7d12287ced0e1b4c03b61c781901f178d9d77",
|
||||
"date": "2021-12-21T10:09:48+01:00",
|
||||
"path": "/nix/store/minmlh0avkwvvc3p7flhpbglp13kr585-nixpkgs",
|
||||
"sha256": "0bbd2pgcyavqn5wgq0xp8p67lha0kv9iqnh49i9w5fb5g29q7i30",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"url": "https://github.com/nix-community/NUR",
|
||||
"rev": "974ffb5b64f042e276a145f1e908e46ad113c94a",
|
||||
"date": "2021-07-24T04:08:57+00:00",
|
||||
"path": "/nix/store/ajj13rf7mvvx5gz97gi5nns5lfadgj6z-NUR",
|
||||
"sha256": "0nra8wrn6a9f7kwicd89zynsiyba942kn8j9ky3zhfy42vav4bsf",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/krebs/retiolum",
|
||||
"rev": "5fa059edf71b9c7fd6c22fb96565a7ac51f5192b",
|
||||
"date": "2021-07-01T09:32:17+02:00",
|
||||
"path": "/nix/store/szi4p83xs5n5diqncmrrwsp7bk4h3llm-retiolum",
|
||||
"sha256": "1kzxqpqgvvz4rva3mfq0l3ri7ggnx96pwzmsp2f016xpiz8brf0y",
|
||||
"rev": "b72b0a987767b587c79cba8499b5114d69fceeef",
|
||||
"date": "2021-12-28T19:46:45+00:00",
|
||||
"path": "/nix/store/kyaqwf89v6id9mda92x4b0hf778j987x-retiolum",
|
||||
"sha256": "19hjzzlfk1m9ign33w4ppqgmg23v7c6k8l0fm7f33spq8982w7rb",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"url": "https://cgit.krebsco.de/stockholm",
|
||||
"rev": "6c1f1c26e7a5e2d11cc8a1d43d86568c760af526",
|
||||
"date": "2021-06-18T20:59:04+02:00",
|
||||
"path": "/nix/store/4g1qxaxjba1c6nk64z7j653w5wy4k2k1-stockholm",
|
||||
"sha256": "16af154q7bf4i15ywc3zs3dhzc96lnd276wdl7h0a7c6wk59xa1w",
|
||||
"url": "https://cgit.lassul.us/stockholm",
|
||||
"rev": "576c05cf3a0ceddefa29c2d0073108177c3cfa52",
|
||||
"date": "2021-12-22T13:59:46+01:00",
|
||||
"path": "/nix/store/yx1j5pardgd9114f0cf3c4xjfq6r4yfv-stockholm",
|
||||
"sha256": "18napi4k8i2iizrismlp9ha3ga6c3n2dvrhijy59kl1jxqrsaq9l",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
||||
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 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)
|
||||
11
configs/beets.nix
Normal file
11
configs/beets.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.beets ];
|
||||
home-manager.users.me.xdg.configFile = {
|
||||
"beets/config.yaml".source = (pkgs.formats.yaml {}).generate "config.yaml" {
|
||||
directory = "~/cloud/syncthing/music";
|
||||
library = "~/cloud/syncthing/common/music.db";
|
||||
plugins = toString [ "fetchart" "lastgenre" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
57
configs/bvg.nix
Normal file
57
configs/bvg.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) serveHtml;
|
||||
stations = [
|
||||
900068204 # A/M
|
||||
900068302 # KAS
|
||||
900068203 # B-P
|
||||
];
|
||||
fahrplan = pkgs.writeText "fahrplan.html" ''
|
||||
<!DOCTYPE html>
|
||||
<title>Fahrplan</title>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/x-icon"
|
||||
href="https://mobil.bvg.de/Fahrinfo/img/ua_xhtml/logo.gif"
|
||||
/>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
--bvg-yellow: #f0d722;
|
||||
}
|
||||
#fahrplan {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
}
|
||||
#fahrplan iframe {
|
||||
flex-grow: 1;
|
||||
border: none;
|
||||
}
|
||||
#fahrplan iframe + iframe {
|
||||
border-left: 2px solid var(--bvg-yellow);
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="fahrplan">
|
||||
${lib.concatMapStrings (station: ''
|
||||
<iframe scrolling="no" src="https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1&input=${toString station}&boardType=depRT&start=yes"></iframe>
|
||||
'') stations}
|
||||
</div>
|
||||
</body>
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."bvg.kmein.r" = {
|
||||
locations."/".extraConfig = serveHtml fahrplan pkgs;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,4 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
<niveum/modules/dropbox.nix>
|
||||
];
|
||||
|
||||
niveum = {
|
||||
dropbox.enable = false;
|
||||
};
|
||||
|
||||
system.activationScripts.home-symlinks = ''
|
||||
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
||||
@@ -17,27 +9,45 @@
|
||||
services.nextcloud-client.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "book" ''
|
||||
set -efu
|
||||
book="$({
|
||||
${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 {
|
||||
enable = true;
|
||||
user = "kfm";
|
||||
openDefaultPorts = true;
|
||||
configDir = "/home/kfm/.config/syncthing";
|
||||
dataDir = "/home/kfm/.config/syncthing";
|
||||
declarative = rec {
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
inherit ((import <niveum/lib>).syncthing) devices;
|
||||
folders =
|
||||
let cloud-dir = "${config.users.users.me.home}/cloud";
|
||||
in {
|
||||
"${cloud-dir}/syncthing/common".devices = [ "wilde" "manakish" ];
|
||||
"${cloud-dir}/syncthing/library".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/music".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/moodle" = {
|
||||
devices = [ "wilde" "toum" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
"${cloud-dir}/syncthing/common".devices = [ "kabsa" "manakish" ];
|
||||
"${cloud-dir}/syncthing/library".devices = [ "kabsa" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "kabsa" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/music" = {
|
||||
devices = [ "kabsa" "manakish" "heym" "zaatar" ];
|
||||
id = "music";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
37
configs/copyq.nix
Normal file
37
configs/copyq.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ 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,29 +1,23 @@
|
||||
{ pkgs, lib, config, options, ... }:
|
||||
{ inputs, pkgs, lib, config, options, ... }:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import <niveum/lib>) localAddresses kieran;
|
||||
in {
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
<niveum/modules/system-dependent.nix>
|
||||
../modules/system-dependent.nix
|
||||
{
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
}
|
||||
{
|
||||
nix.nixPath = [
|
||||
"/var/src"
|
||||
"nixpkgs-overlays=${toString ../overlays}"
|
||||
];
|
||||
}
|
||||
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
nur = import <nur> { inherit pkgs; };
|
||||
writeDashBin = pkgs.writers.writeDashBin;
|
||||
writeDash = pkgs.writers.writeDash;
|
||||
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
|
||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
|
||||
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
|
||||
@@ -31,11 +25,8 @@ in {
|
||||
};
|
||||
overlays = [
|
||||
(self: super: {
|
||||
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
|
||||
scripts = import <niveum/packages/scripts> { pkgs = super; inherit lib; };
|
||||
})
|
||||
(import <stockholm/krebs/5pkgs/haskell>)
|
||||
(import <stockholm/submodules/nix-writers/pkgs>)
|
||||
(import <stockholm/krebs/5pkgs/override>)
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -69,6 +60,7 @@ in {
|
||||
};
|
||||
|
||||
home-manager.users.me.xdg.enable = true;
|
||||
home-manager.users.me.dconf.enable = false;
|
||||
}
|
||||
{
|
||||
sound.enable = true;
|
||||
@@ -142,7 +134,6 @@ in {
|
||||
};
|
||||
}
|
||||
{ i18n.defaultLocale = "en_GB.UTF-8"; }
|
||||
{ services.illum.enable = true; }
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
@@ -163,8 +154,16 @@ in {
|
||||
}
|
||||
{
|
||||
security.wrappers = {
|
||||
pmount.source = "${pkgs.pmount}/bin/pmount";
|
||||
pumount.source = "${pkgs.pmount}/bin/pumount";
|
||||
pmount = {
|
||||
owner = "root";
|
||||
group = "users";
|
||||
source = "${pkgs.pmount}/bin/pmount";
|
||||
};
|
||||
pumount = {
|
||||
owner = "root";
|
||||
group = "users";
|
||||
source = "${pkgs.pmount}/bin/pumount";
|
||||
};
|
||||
};
|
||||
}
|
||||
{ programs.command-not-found.enable = true; }
|
||||
@@ -193,16 +192,16 @@ in {
|
||||
}
|
||||
./alacritty.nix
|
||||
./bash.nix
|
||||
./beets.nix
|
||||
./bluetooth.nix
|
||||
./ccc.nix
|
||||
./kleiter.nix
|
||||
# ./kleiter.nix
|
||||
./khal.nix
|
||||
./engiadina.nix
|
||||
./chromium.nix
|
||||
./cloud.nix
|
||||
./copyq.nix
|
||||
./compton.nix
|
||||
./direnv.nix
|
||||
./distrobump.nix
|
||||
./docker.nix
|
||||
./dunst.nix
|
||||
./flix.nix
|
||||
@@ -214,13 +213,13 @@ in {
|
||||
./htop.nix
|
||||
./hu-berlin.nix
|
||||
./i3.nix
|
||||
./keybase.nix
|
||||
./keyboard.nix
|
||||
./mail/client.nix
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
./mime.nix
|
||||
./nano.nix
|
||||
./neovim.nix
|
||||
./neomutt.nix
|
||||
./nix.nix
|
||||
./newsboat.nix
|
||||
./flameshot-once.nix
|
||||
@@ -240,13 +239,12 @@ in {
|
||||
./sxiv.nix
|
||||
./theming.nix
|
||||
./tmux.nix
|
||||
./tor.nix
|
||||
# ./tor.nix
|
||||
./traadfri.nix
|
||||
./unclutter.nix
|
||||
./version.nix
|
||||
./vscode.nix
|
||||
./watson.nix
|
||||
./wifi.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,8 +11,7 @@ let
|
||||
cat > shell.nix <<'EOF'
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [];
|
||||
shellHook = "export HISTFILE=''${toString ./.history}";
|
||||
buildInputs = [];
|
||||
}
|
||||
EOF
|
||||
''${EDITOR:-vim} shell.nix
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
|
||||
inherit lib config;
|
||||
pkgs = pkgs // { writeDash = pkgs.writers.writeDash; };
|
||||
})
|
||||
];
|
||||
|
||||
makefu.distrobump.enable = false;
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
virtualisation.docker.enable = true;
|
||||
{ lib, pkgs, ... }: {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
# for ICE wifi, ref https://gist.github.com/sunsided/7840e89ff4e11b64a2d7503fafa0290c
|
||||
extraOptions = lib.concatStringsSep " " [
|
||||
"--bip=172.39.1.5/24"
|
||||
"--fixed-cidr=172.39.1.0/25"
|
||||
];
|
||||
};
|
||||
users.users.me.extraGroups = [ "docker" ];
|
||||
environment.systemPackages = [ pkgs.docker pkgs.docker_compose ];
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||
cdnRoot = "/var/lib/engiadina";
|
||||
in
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/permown.nix> ];
|
||||
|
||||
krebs.permown.${cdnRoot} = {
|
||||
owner = config.users.users.me.name;
|
||||
group = "users";
|
||||
umask = "0002";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.default = {
|
||||
root = cdnRoot;
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 3333;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
environment.shellAliases = {
|
||||
engiadina-watch = "${pkgs.findutils}/bin/find extra-src src | ${pkgs.entr}/bin/entr -s 'build-component && ${pkgs.rsync}/bin/rsync -avu dist/*.js ${cdnRoot}/'";
|
||||
engiadina-edit = "$EDITOR ${cdnRoot}/index.html";
|
||||
};
|
||||
}
|
||||
@@ -1,26 +1,24 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.me = {
|
||||
services.flameshot.enable = true;
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) defaultApplications;
|
||||
flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||
in {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
write =
|
||||
super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> { };
|
||||
})
|
||||
];
|
||||
|
||||
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini {}).generate "flameshot.ini" {
|
||||
General = {
|
||||
disabledTrayIcon = true;
|
||||
checkForUpdates = false;
|
||||
contrastOpacity = 188;
|
||||
savePath = "/tmp";
|
||||
savePathFixed = true;
|
||||
drawThickness = 0;
|
||||
showStartupLaunchMessage = false;
|
||||
filenamePattern = "shot_%F_%T";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.flameshot.Unit.Requires = lib.mkForce [];
|
||||
systemd.user.services.flameshot.Environment = {
|
||||
# IMGUR_CREATE_URL = "https://p.krebsco.de/image";
|
||||
# IMGUR_DELETE_URL = "https://p.krebsco.de/image/delete/%1";
|
||||
PATH = "${config.home-manager.users.me.home.profileDirectory}/bin";
|
||||
};
|
||||
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;
|
||||
};
|
||||
config.timeout = 1000;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ in {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = cacheLocation;
|
||||
extraGroups = [ flixGroup ];
|
||||
group = flixGroup;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeDashBin "mpv-simpsons" ''
|
||||
(pkgs.writers.writeDashBin "mpv-simpsons" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
||||
@@ -65,7 +65,7 @@ in {
|
||||
| shuf \
|
||||
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
|
||||
'')
|
||||
(pkgs.writeDashBin "flixmenu" ''
|
||||
(pkgs.writers.writeDashBin "flixmenu" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
enableDefaultFonts = true;
|
||||
fontDir.enable = true;
|
||||
fonts = with pkgs; [
|
||||
alegreya
|
||||
alegreya-sans
|
||||
corefonts
|
||||
eb-garamond
|
||||
fira
|
||||
@@ -30,7 +32,7 @@
|
||||
joypixels
|
||||
];
|
||||
fontconfig.defaultFonts = {
|
||||
monospace = [ "JetBrains Mono" ];
|
||||
monospace = [ "JetBrains Mono" "JoyPixels" ];
|
||||
serif = [ "Roboto Slab" ];
|
||||
sansSerif = [ "Roboto" "Noto Sans" ];
|
||||
emoji = [ "JoyPixels" ];
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
disableRegistration = true;
|
||||
rootUrl = "https://code.xn--kiern-0qa.de";
|
||||
appName = "code.kierán.de";
|
||||
rootUrl = "https://code.kmein.de";
|
||||
appName = "code.kmein.de";
|
||||
};
|
||||
services.nginx.virtualHosts."code.xn--kiern-0qa.de" = {
|
||||
services.nginx.virtualHosts."code.kmein.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
|
||||
|
||||
@@ -1,25 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
backupLocation = "/var/lib/codimd-backup";
|
||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
domain = "pad.kmein.de";
|
||||
in
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/permown.nix> ];
|
||||
|
||||
services.nginx.virtualHosts."pad.xn--kiern-0qa.de" = {
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/".extraConfig = ''
|
||||
client_max_body_size 4G;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:3091;
|
||||
'';
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "https://localhost:3091";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.certs.${domain}.group = "hedgecert";
|
||||
users.groups.hedgecert.members = [ "codimd" "nginx" ];
|
||||
|
||||
security.dhparams = {
|
||||
enable = true;
|
||||
params.hedgedoc = {};
|
||||
};
|
||||
|
||||
services.hedgedoc = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
allowOrigin = [ domain ];
|
||||
allowAnonymous = true;
|
||||
allowGravatar = false;
|
||||
allowFreeURL = true;
|
||||
@@ -28,6 +37,13 @@ in
|
||||
storage = stateLocation;
|
||||
};
|
||||
port = 3091;
|
||||
domain = domain;
|
||||
useSSL = true;
|
||||
protocolUseSSL = true;
|
||||
sslCAPath = [ "/etc/ssl/certs/ca-certificates.crt" ];
|
||||
sslCertPath = "/var/lib/acme/${domain}/cert.pem";
|
||||
sslKeyPath = "/var/lib/acme/${domain}/key.pem";
|
||||
dhParamPath = config.security.dhparams.params.hedgedoc.path;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ config, pkgs, ... }: {
|
||||
imports = [ <niveum/modules/hledger.nix> ];
|
||||
imports = [ ../modules/hledger.nix ];
|
||||
|
||||
niveum.hledger = {
|
||||
enable = true;
|
||||
|
||||
@@ -6,23 +6,6 @@ let
|
||||
identity = fileContents <secrets/eduroam/identity>;
|
||||
password = fileContents <secrets/eduroam/password>;
|
||||
};
|
||||
eduroamAuth = ''
|
||||
key_mgmt=WPA-EAP
|
||||
eap=TTLS
|
||||
proto=RSN
|
||||
identity="${eduroam.identity}"
|
||||
anonymous_identity="anonymous@wlan.hu-berlin.de"
|
||||
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
|
||||
password="${eduroam.password}"
|
||||
ca_cert="${
|
||||
pkgs.fetchurl {
|
||||
url =
|
||||
"https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
|
||||
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
||||
}
|
||||
}"
|
||||
phase2="auth=PAP"
|
||||
'';
|
||||
hu-berlin-cifs-options = [
|
||||
"uid=${toString config.users.users.me.uid}"
|
||||
"gid=${toString config.users.groups.users.gid}"
|
||||
@@ -37,11 +20,6 @@ let
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
in {
|
||||
networking.wireless.networks = {
|
||||
eduroam_5GHz.auth = eduroamAuth;
|
||||
eduroam.auth = eduroamAuth;
|
||||
};
|
||||
|
||||
fileSystems."/media/hu-berlin/germpro2" = {
|
||||
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
|
||||
fsType = "cifs";
|
||||
@@ -54,14 +32,34 @@ in {
|
||||
options = hu-berlin-cifs-options;
|
||||
};
|
||||
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
matchBlocks = {
|
||||
"alew.hu-berlin.de" = {
|
||||
user = "centos";
|
||||
hostname = "141.20.187.219";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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 = false;
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
conflicts = [ "openvpn-hu-berlin.service" ];
|
||||
script = ''
|
||||
|
||||
@@ -182,13 +182,16 @@ in {
|
||||
"${modifier}+Shift+q" = "kill";
|
||||
"${modifier}+Shift+r" = "restart";
|
||||
|
||||
"${modifier}+Shift+s" = "sticky toggle";
|
||||
"${modifier}+z" = "sticky toggle";
|
||||
"${modifier}+Shift+z" = "floating toggle";
|
||||
|
||||
"${modifier}+s" = "scratchpad show";
|
||||
"${modifier}+Shift+s" = "move scratchpad";
|
||||
|
||||
"${modifier}+c" = "split h";
|
||||
"${modifier}+e" = "layout toggle split";
|
||||
"${modifier}+f" = "fullscreen toggle";
|
||||
"${modifier}+r" = "mode resize";
|
||||
"${modifier}+s" = "layout stacking";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
|
||||
@@ -210,7 +213,11 @@ in {
|
||||
}
|
||||
|
||||
cd ~/notes
|
||||
note_file=$(find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2 | dmenu -i)
|
||||
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
|
||||
} | dmenu -i)
|
||||
if test "$note_file"
|
||||
then
|
||||
i3-sensible-terminal -e "$EDITOR" "$note_file"
|
||||
@@ -226,23 +233,16 @@ in {
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||
"${modifier}+F12" = "exec ${klem}/bin/klem";
|
||||
|
||||
"Print" = "exec flameshot gui -p /tmp";
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"Print" = "exec flameshot-once";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"XF86AudioRaiseVolume" =
|
||||
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
"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";
|
||||
"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";
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, ... }: {
|
||||
services.keybase.enable = true;
|
||||
|
||||
services.kbfs = {
|
||||
enable = true;
|
||||
mountPoint = "%h/cloud/keybase";
|
||||
};
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
let commaSep = builtins.concatStringsSep ",";
|
||||
in {
|
||||
services.xserver = {
|
||||
layout = commaSep [ "de" "gr" ];
|
||||
xkbVariant = commaSep [ "T3" "polytonic" ];
|
||||
layout = commaSep [ "de" "gr" "ru" ];
|
||||
xkbVariant = commaSep [ "T3" "polytonic" "phonetic" ];
|
||||
xkbOptions =
|
||||
commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
|
||||
libinput.enable = true;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
{ 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 ];
|
||||
@@ -17,6 +24,10 @@ in
|
||||
${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 = {
|
||||
@@ -48,26 +59,48 @@ in
|
||||
skip_unparsable = no
|
||||
'';
|
||||
|
||||
"todoman/todoman.conf".text = ''
|
||||
[main]
|
||||
path = ${davHome}/calendar/*
|
||||
date_format = %Y-%m-%d
|
||||
time_format = %H:%M
|
||||
"todoman/config.py".text = ''
|
||||
path = "${davHome}/calendar/*"
|
||||
date_format = "%Y-%m-%d"
|
||||
time_format = "%H:%M"
|
||||
default_due = 0
|
||||
default_list = Personal
|
||||
default_list = "Personal"
|
||||
startable = True
|
||||
'';
|
||||
|
||||
"khal/config".text = ''
|
||||
[calendars]
|
||||
|
||||
[[kalender_local]]
|
||||
path = ${davHome}/calendar/*
|
||||
type = discover
|
||||
[[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
|
||||
@@ -93,7 +126,13 @@ in
|
||||
[pair kalender]
|
||||
a = "kalender_local"
|
||||
b = "kalender_cloud"
|
||||
collections = ["from a", "from b"]
|
||||
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]
|
||||
@@ -108,15 +147,21 @@ in
|
||||
|
||||
[storage kontakte_cloud]
|
||||
type = "carddav"
|
||||
url = "${davEndpoint}/addressbooks/users/${username}/"
|
||||
username = "${username}"
|
||||
password = "${password}"
|
||||
url = "${kmeinCloud.davEndpoint}/addressbooks/users/${kmeinCloud.username}/"
|
||||
username = "${kmeinCloud.username}"
|
||||
password = "${kmeinCloud.password}"
|
||||
|
||||
[storage kalender_cloud]
|
||||
type = "caldav"
|
||||
url = "${davEndpoint}/calendars/${username}/"
|
||||
username = "${username}"
|
||||
password = "${password}"
|
||||
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,13 +0,0 @@
|
||||
{ ... }:
|
||||
let ssid = "Kleiter Gast";
|
||||
in {
|
||||
networking.wireless.networks.${ssid}.psk = "Kleiter-Gast";
|
||||
|
||||
# fix dns
|
||||
systemd.network.networks.kleiter = {
|
||||
dns = [ "8.8.8.8" "8.8.4.4" ];
|
||||
networkConfig.DHCP = "yes";
|
||||
matchConfig.Name = "wlp3s0";
|
||||
matchConfig.SSID = ssid;
|
||||
};
|
||||
}
|
||||
27
configs/lb.nix
Normal file
27
configs/lb.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
in
|
||||
{
|
||||
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/" \
|
||||
| ${nixpkgs-unstable.htmlq}/bin/htmlq --attribute href 'ul.slides a' \
|
||||
| while read -r month; do
|
||||
${pkgs.curl}/bin/curl -sSL "$month" \
|
||||
| ${nixpkgs-unstable.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
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
enableDefaults = lib.recursiveUpdate {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
};
|
||||
msmtp.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
fastmail = {
|
||||
smtp = {
|
||||
host = "smtp.fastmail.com";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
imap = {
|
||||
host = "imap.fastmail.com";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
cock = {
|
||||
smtp = {
|
||||
host = "mail.cock.li";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mail.cock.li";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
posteo = {
|
||||
smtp = {
|
||||
host = "posteo.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "posteo.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
hu-berlin = {
|
||||
smtp = {
|
||||
host = "mailhost.cms.hu-berlin.de";
|
||||
port = 25;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mailbox.cms.hu-berlin.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# turns out we have to escape $ because, if the password contains a $, it will get interpolated as a variable by the msmtp `passwordeval` which does: `bash -c "COMMAND; echo"`
|
||||
pass_ = file: "echo ${lib.escape ["$"] (lib.escapeShellArg (lib.strings.fileContents file))}";
|
||||
in
|
||||
{
|
||||
fysi = enableDefaults {
|
||||
primary = false;
|
||||
userName = "kieran@fysi.tech";
|
||||
address = "kieran@fysi.tech";
|
||||
realName = kieran.name;
|
||||
passwordCommand = pass_ <secrets/mail/fastmail>;
|
||||
inherit (settings.fastmail) imap smtp;
|
||||
};
|
||||
cock = enableDefaults {
|
||||
primary = false;
|
||||
userName = "2210@cock.li";
|
||||
address = "2210@cock.li";
|
||||
realName = "2210";
|
||||
passwordCommand = pass_ <secrets/mail/cock>;
|
||||
inherit (settings.cock) imap smtp;
|
||||
};
|
||||
kieran-gmail = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "kieran.meinhardt@gmail.com";
|
||||
realName = kieran.name;
|
||||
userName = "kieran.meinhardt";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Entw&APw-rfe";
|
||||
sent = "[Gmail]/Gesendet";
|
||||
trash = "[Gmail]/Papierkorb";
|
||||
};
|
||||
};
|
||||
amroplay = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "amroplay@gmail.com";
|
||||
realName = kieran.name;
|
||||
userName = "amroplay";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Drafts";
|
||||
sent = "[Gmail]/Sent Mail";
|
||||
trash = "[Gmail]/Bin";
|
||||
};
|
||||
};
|
||||
posteo = enableDefaults {
|
||||
primary = true;
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
realName = kieran.name;
|
||||
userName = "kieran.meinhardt@posteo.net";
|
||||
passwordCommand = pass_ <secrets/mail/posteo>;
|
||||
inherit (settings.posteo) imap smtp;
|
||||
};
|
||||
hu-berlin = enableDefaults {
|
||||
primary = false;
|
||||
address = "meinhark@hu-berlin.de";
|
||||
realName = kieran.name;
|
||||
userName = "meinhark";
|
||||
passwordCommand = pass_ <secrets/eduroam/password>;
|
||||
inherit (settings.hu-berlin) imap smtp;
|
||||
};
|
||||
hu-berlin-work = enableDefaults {
|
||||
primary = false;
|
||||
address = "meinhaki@hu-berlin.de";
|
||||
realName = kieran.name;
|
||||
userName = "meinhaki";
|
||||
passwordCommand = pass_ <secrets/mail/meinhaki>;
|
||||
inherit (settings.hu-berlin) imap smtp;
|
||||
};
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) email-sshKey;
|
||||
much =
|
||||
let
|
||||
nixpkgs-much = import (pkgs.fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "7c2a362b58a1c2ba72d24aa3869da3b1a91d39e1";
|
||||
sha256 = "0gl4xndyahasa9dv5mi3x9w8s457wl2xh9lcldizcn1irjvkrzs4";
|
||||
}) {
|
||||
overlays = [
|
||||
(import <stockholm/krebs/5pkgs/haskell>)
|
||||
];
|
||||
};
|
||||
much-pkg = pkgs.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
|
||||
in nixpkgs-much.haskell.lib.dontHaddock much-pkg;
|
||||
in {
|
||||
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
|
||||
users.users.me.openssh.authorizedKeys.keys = [ email-sshKey ];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.notmuch-addrlookup
|
||||
|
||||
pkgs.muchsync
|
||||
|
||||
(pkgs.writers.writeDashBin "mua" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
${much}/bin/much-kmein
|
||||
else
|
||||
${much}/bin/much-kmein -q "$*"
|
||||
fi
|
||||
'')
|
||||
|
||||
(pkgs.writers.writeDashBin "mail-clean" ''
|
||||
${pkgs.notmuch}/bin/notmuch search --output files --format=text0 tag:deleted | ${pkgs.findutils}/bin/xargs -r0 rm
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'')
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
search.excludeTags = [ "deleted" "spam" ];
|
||||
};
|
||||
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
accounts.email.accounts = import ./accounts.nix { inherit lib; };
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran sshPort;
|
||||
|
||||
tagRules = [
|
||||
{
|
||||
query = "to:miaengiadina-pwa@noreply.github.com AND subject:\"PR run failed\"";
|
||||
tags = [ "-new" "+deleted" ];
|
||||
}
|
||||
{
|
||||
query = lib.concatStringsSep " OR " [
|
||||
"from:noreply-local-guides@google.com"
|
||||
"from:google-maps-noreply@google.com"
|
||||
"subject:fd-noti"
|
||||
"from:nebenan.de"
|
||||
"to:miaengiadina-pwa@noreply.github.com"
|
||||
];
|
||||
tags = [ "-new" ];
|
||||
}
|
||||
{
|
||||
query = "tag:new";
|
||||
tags = [ "-new" "+inbox" ];
|
||||
}
|
||||
];
|
||||
|
||||
generateTaggingScript = filters:
|
||||
let
|
||||
template = { tags, query, message ? "tagging ${query} -> ${lib.concatStringsSep " " tags}", ... }: ''
|
||||
echo '${message}'
|
||||
${pkgs.notmuch}/bin/notmuch tag ${lib.concatStringsSep " " tags} -- "${query}"
|
||||
'';
|
||||
in lib.concatStringsSep "\n" (map template filters);
|
||||
in
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/secret.nix> ];
|
||||
|
||||
krebs.secret.files.email-ssh = {
|
||||
path = "${config.users.users.email.home}/.ssh/id_ed25519";
|
||||
owner.name = config.users.users.email.name;
|
||||
source-path = toString <system-secrets> + "/email/ssh.key";
|
||||
};
|
||||
|
||||
users.users.email = {
|
||||
isNormalUser = true;
|
||||
description = "fetching mails since 2021";
|
||||
};
|
||||
|
||||
systemd.services.mail-sync =
|
||||
let
|
||||
hosts = [ "manakish.r" "wilde.r" ];
|
||||
in {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" config.krebs.secret.files.email-ssh.service ];
|
||||
startAt = "*:0/3";
|
||||
serviceConfig.User = config.users.users.email.name;
|
||||
serviceConfig.Type = "oneshot";
|
||||
environment.NOTMUCH_CONFIG = config.home-manager.users.email.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
path = [ pkgs.notmuch pkgs.openssh ];
|
||||
script = ''
|
||||
${pkgs.isync}/bin/mbsync --all || true
|
||||
|
||||
${lib.concatMapStringsSep "\n" (host: ''
|
||||
echo === syncing ${host}
|
||||
${pkgs.muchsync}/bin/muchsync -s 'ssh -CTaxq -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=4 -p ${toString sshPort}' kfm@${host} || :
|
||||
'') hosts}
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.email = {
|
||||
programs.mbsync.enable = true;
|
||||
|
||||
accounts.email.accounts = import ./accounts.nix { inherit lib; };
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new.tags = [ "new" ];
|
||||
hooks.postNew = generateTaggingScript tagRules;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -22,9 +22,9 @@
|
||||
};
|
||||
telegram.kmein.Token = bridgeBotToken;
|
||||
irc =
|
||||
let Nick = "ponte"; StripMarkdown = true;
|
||||
let Nick = "ponte";
|
||||
in {
|
||||
hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick StripMarkdown; };
|
||||
hackint = { Server = "irc.hackint.org:6697"; UseTLS = true; inherit Nick; };
|
||||
};
|
||||
mumble.lassulus = {
|
||||
Server = "lassul.us:64738";
|
||||
|
||||
41
configs/menstruation.nix
Normal file
41
configs/menstruation.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
backend = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
|
||||
telegram = pkgs.callPackage <niveum/submodules/menstruation-telegram> {};
|
||||
backendPort = 8000;
|
||||
in
|
||||
{
|
||||
containers.menstruation.autoStart = true;
|
||||
containers.menstruation.config = { config, pkgs, ... }: {
|
||||
services.redis.enable = true;
|
||||
|
||||
systemd.services.menstruation-telegram = {
|
||||
wants = [
|
||||
"network-online.target"
|
||||
"menstruation-backend.service"
|
||||
"redis.service"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
MENSTRUATION_TOKEN = lib.strings.fileContents <system-secrets/telegram/menstruation.token>;
|
||||
MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}";
|
||||
MENSTRUATION_MODERATORS = "18980945";
|
||||
};
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
ExecStart = "${telegram}/bin/menstruation-telegram";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.menstruation-backend = {
|
||||
wants = [ "network-online.target" ];
|
||||
environment.ROCKET_PORT = toString backendPort;
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
ExecStart = "${backend}/bin/menstruation_server";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
configs/monitoring/blackbox.nix
Normal file
17
configs/monitoring/blackbox.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
# https://github.com/Fluepke/nix-files/blob/2be70b76a198afaa7763132fed645a3c19d5af6e/configuration/common/blackbox-exporter.yml
|
||||
# https://github.com/xHain-hackspace/xhain-nixfiles/blob/0d6e3b87a07317c2d54cccabf4f90da589319e2c/common/prometheus/blackbox-exporter.yml
|
||||
{
|
||||
modules.http_2xx = {
|
||||
http = {
|
||||
fail_if_not_ssl = true;
|
||||
ip_protocol_fallback = false;
|
||||
method = "GET";
|
||||
no_follow_redirects = false;
|
||||
preferred_ip_protocol = "ip4";
|
||||
valid_http_versions = [ "HTTP/1.1" "HTTP/2.0" ];
|
||||
tls_config.insecure_skip_verify = true;
|
||||
};
|
||||
prober = "http";
|
||||
timeout = "15s";
|
||||
};
|
||||
}
|
||||
60
configs/monitoring/loki.nix
Normal file
60
configs/monitoring/loki.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
auth_enabled = false;
|
||||
server = {
|
||||
http_listen_port = 3100;
|
||||
grpc_listen_port = 9096;
|
||||
};
|
||||
ingester = {
|
||||
wal = {
|
||||
enabled = true;
|
||||
dir = "/tmp/wal";
|
||||
};
|
||||
lifecycler = {
|
||||
address = "127.0.0.1";
|
||||
ring = {
|
||||
kvstore.store = "inmemory";
|
||||
replication_factor = 1;
|
||||
};
|
||||
final_sleep = "0s";
|
||||
};
|
||||
chunk_idle_period = "1h"; # Any chunk not receiving new logs in this time will be flushed
|
||||
max_chunk_age = "1h"; # All chunks will be flushed when they hit this age, default is 1h
|
||||
chunk_target_size = 1048576; # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
|
||||
chunk_retain_period = "30s"; # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
|
||||
max_transfer_retries = 0; # Chunk transfers disabled
|
||||
};
|
||||
schema_config.configs = [
|
||||
{
|
||||
from = "2020-10-24";
|
||||
store = "boltdb-shipper";
|
||||
object_store = "filesystem";
|
||||
schema = "v11";
|
||||
index = {
|
||||
prefix = "index_";
|
||||
period = "24h";
|
||||
};
|
||||
}
|
||||
];
|
||||
storage_config = {
|
||||
boltdb_shipper = {
|
||||
active_index_directory = "/tmp/loki/boltdb-shipper-active";
|
||||
cache_location = "/tmp/loki/boltdb-shipper-cache";
|
||||
cache_ttl = "24h"; # Can be increased for faster performance over longer query periods, uses more disk space
|
||||
shared_store = "filesystem";
|
||||
};
|
||||
filesystem.directory = "/tmp/loki/chunks";
|
||||
};
|
||||
compactor = {
|
||||
working_directory = "/tmp/loki/boltdb-shipper-compactor";
|
||||
shared_store = "filesystem";
|
||||
};
|
||||
limits_config = {
|
||||
reject_old_samples = true;
|
||||
reject_old_samples_max_age = "168h";
|
||||
};
|
||||
chunk_store_config.max_look_back_period = "0s";
|
||||
table_manager = {
|
||||
retention_deletes_enabled = false;
|
||||
retention_period = "0s";
|
||||
};
|
||||
}
|
||||
229
configs/monitoring/pull.nix
Normal file
229
configs/monitoring/pull.nix
Normal file
@@ -0,0 +1,229 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
lokiConfig = import ./loki.nix;
|
||||
blackboxConfig = import ./blackbox.nix;
|
||||
in
|
||||
{
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.kmein.r";
|
||||
port = 9444;
|
||||
addr = "127.0.0.1";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.rules = let diskFreeThreshold = 10; in [(builtins.toJSON {
|
||||
groups = [{
|
||||
name = "niveum";
|
||||
rules = [
|
||||
{
|
||||
alert = "ServiceDown";
|
||||
expr = ''node_systemd_unit_state{state="failed"} == 1'';
|
||||
annotations = {
|
||||
summary = "{{$labels.job}}: Service {{$labels.name}} failed to start.";
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "RootPartitionFull";
|
||||
for = "10m";
|
||||
expr = ''(node_filesystem_free_bytes{mountpoint="/"} * 100) / node_filesystem_size_bytes{mountpoint="/"} < ${toString diskFreeThreshold}'';
|
||||
annotations = {
|
||||
summary = "{{ $labels.job }}: Filesystem is running out of space soon.";
|
||||
description = ''The root disk of {{ $labels.job }} has {{ $value | printf "%.2f" }}% free disk space (threshold at ${toString diskFreeThreshold}%).'';
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "RootPartitionFullWeek";
|
||||
for = "1h";
|
||||
expr = ''node_filesystem_free_bytes{mountpoint="/"} ''
|
||||
+ ''and predict_linear(node_filesystem_free_bytes{mountpoint="/"}[2d], 7*24*3600) <= 0'';
|
||||
annotations = {
|
||||
summary = "{{$labels.job}}: Filesystem is running out of space in 7 days.";
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "HighLoad";
|
||||
expr = ''node_load15 / on(job) count(node_cpu_seconds_total{mode="system"}) by (job) >= 1.0'';
|
||||
for = "10m";
|
||||
annotations = {
|
||||
summary = "{{$labels.job}}: Running on high load: {{$value}}";
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "HighRAM";
|
||||
expr = "node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes < node_memory_MemTotal_bytes * 0.1";
|
||||
for = "1h";
|
||||
annotations.summary = "{{$labels.job}}: Using lots of RAM.";
|
||||
}
|
||||
{
|
||||
alert = "UptimeMonster";
|
||||
expr = "time() - node_boot_time_seconds > 2592000";
|
||||
annotations.summary = "{{$labels.job}}: up for more than 30 days.";
|
||||
}
|
||||
{
|
||||
alert = "HostDown";
|
||||
expr = ''up == 0'';
|
||||
for = "5m";
|
||||
annotations = {
|
||||
summary = "Host {{ $labels.job }} down for 5 minutes.";
|
||||
};
|
||||
}
|
||||
{
|
||||
alert = "Reboot";
|
||||
expr = "time() - node_boot_time_seconds < 300";
|
||||
annotations.summary = "{{$labels.job}}: Reboot";
|
||||
}
|
||||
{
|
||||
alert = "ProbeFailed";
|
||||
expr = "probe_success == 0";
|
||||
for = "5m";
|
||||
annotations.summary = "{{$labels.instance}}: probe failed";
|
||||
}
|
||||
{
|
||||
alert = "SlowProbe";
|
||||
expr = "avg_over_time(probe_http_duration_seconds[1m]) > 1";
|
||||
for = "5m";
|
||||
annotations.summary = "{{$labels.instance}}: HTTP probe slow";
|
||||
}
|
||||
{
|
||||
alert = "HttpStatusCode";
|
||||
expr = "probe_http_status_code != 0 AND (probe_http_status_code <= 199 OR probe_http_status_code >= 400)";
|
||||
for = "5m";
|
||||
annotations.summary = "{{$labels.instance}}: status code {{$value}}";
|
||||
}
|
||||
{
|
||||
alert = "SslExpirySoon";
|
||||
expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 30";
|
||||
for = "5m";
|
||||
annotations.summary = "{{$labels.instance}}: SSL certificate expires in 30 days";
|
||||
}
|
||||
{
|
||||
alert = "SslExpiry";
|
||||
expr = "probe_ssl_earliest_cert_expiry - time() <= 0";
|
||||
for = "5m";
|
||||
annotations.summary = "{{$labels.instance}}: SSL certificate has expired";
|
||||
}
|
||||
];
|
||||
}];
|
||||
})];
|
||||
|
||||
systemd.services.alertmanager-bot-telegram =
|
||||
let
|
||||
alertmanager-bot-telegram = pkgs.buildGoModule rec {
|
||||
pname = "alertmanager-bot";
|
||||
version = "2020-07-13";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "metalmatze";
|
||||
repo = "alertmanager-bot";
|
||||
rev = "5efc0bbbf8023d4324e9da98562f064a714a7206";
|
||||
sha256 = "09cciml1j8x76jpm2v5v6h2q6j1fkhsz1kswslmx8wl4wk40xgp4";
|
||||
};
|
||||
vendorSha256 = "1v0fgin8dn81b559zz4lqmrl7hikr46g4gb18sci4riql5qs1isj";
|
||||
postInstall = ''
|
||||
install -D ./default.tmpl $out/templates/default.tmpl
|
||||
'';
|
||||
};
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "ip-up.target" ];
|
||||
environment.TELEGRAM_ADMIN = "18980945";
|
||||
environment.TELEGRAM_TOKEN = lib.strings.fileContents <system-secrets/telegram/prometheus.token>;
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
StateDirectory = "alertbot";
|
||||
ExecStart = ''${alertmanager-bot-telegram}/bin/alertmanager-bot \
|
||||
--alertmanager.url=http://localhost:9093 --log.level=info \
|
||||
--store=bolt --bolt.path=/var/lib/alertbot/bot.db \
|
||||
--listen.addr="0.0.0.0:16320" \
|
||||
--template.paths=${pkgs.writeText "template.tmpl" ''
|
||||
{{ define "telegram.default" }}
|
||||
{{range .Alerts -}}
|
||||
{{ if eq .Status "firing" }}
|
||||
⚠ <b>{{ index .Annotations "summary"}}</b>
|
||||
{{ index .Annotations "description" }}
|
||||
|
||||
See on Grafana: http://${config.services.grafana.domain}/d/alpUteInz/niveum
|
||||
{{ else -}}
|
||||
RESOLVED 😌 <del>{{ index .Annotations "summary"}}</del>
|
||||
{{- end }}
|
||||
{{end -}}
|
||||
{{end}}
|
||||
''}'';
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.alertmanager = {
|
||||
enable = true;
|
||||
listenAddress = "localhost";
|
||||
configuration = {
|
||||
route = {
|
||||
group_wait = "30s";
|
||||
repeat_interval = "4h";
|
||||
receiver = "me";
|
||||
};
|
||||
receivers = [{
|
||||
name = "me";
|
||||
webhook_configs = [{
|
||||
url = "http://localhost:16320";
|
||||
send_resolved = true;
|
||||
}];
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.alertmanagers = [{
|
||||
scheme = "http";
|
||||
path_prefix = "/";
|
||||
static_configs = [ { targets = [ "localhost:9093" ]; } ];
|
||||
}];
|
||||
|
||||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "makanek";
|
||||
static_configs = [ { targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
]; } ];
|
||||
}
|
||||
{
|
||||
scrape_interval = "5m";
|
||||
job_name = "blackbox";
|
||||
metrics_path = "/probe";
|
||||
params.module = [ "http_2xx" ];
|
||||
relabel_configs = [
|
||||
{ source_labels = ["__address__"]; target_label = "__param_target"; }
|
||||
{ source_labels = ["__param_target"]; target_label = "instance"; }
|
||||
{ replacement = "127.0.0.1:${toString config.services.prometheus.exporters.blackbox.port}"; target_label = "__address__"; }
|
||||
];
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"alew.hu-berlin.de"
|
||||
];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "zaatar";
|
||||
static_configs = [ { targets = [ "zaatar.r:${toString config.services.prometheus.exporters.node.port}" ]; } ];
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
services.prometheus.exporters.blackbox = {
|
||||
enable = true;
|
||||
configFile = (pkgs.formats.yaml {}).generate "blackbox.yaml" blackboxConfig;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
lokiConfig.server.http_listen_port
|
||||
];
|
||||
|
||||
services.loki = {
|
||||
enable = true;
|
||||
configFile = (pkgs.formats.yaml {}).generate "loki.yaml" lokiConfig;
|
||||
};
|
||||
}
|
||||
75
configs/monitoring/push.nix
Normal file
75
configs/monitoring/push.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts.default = {
|
||||
locations."= /stub_status".extraConfig = "stub_status;";
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9001;
|
||||
exporters = {
|
||||
nginx.enable = false;
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [
|
||||
"conntrack"
|
||||
"diskstats"
|
||||
"entropy"
|
||||
"filefd"
|
||||
"filesystem"
|
||||
"loadavg"
|
||||
"mdadm"
|
||||
"meminfo"
|
||||
"netdev"
|
||||
"netstat"
|
||||
"stat"
|
||||
"time"
|
||||
"vmstat"
|
||||
"systemd"
|
||||
"logind"
|
||||
"interrupts"
|
||||
"ksmd"
|
||||
];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ config.services.prometheus.exporters.node.port ];
|
||||
|
||||
systemd.services.promtail = {
|
||||
description = "Promtail service for Loki";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.grafana-loki}/bin/promtail --config.file ${(pkgs.formats.yaml {}).generate "promtail.yaml" {
|
||||
server = {
|
||||
http_listen_port = 28183;
|
||||
grpc_listen_port = 0;
|
||||
};
|
||||
positions.filename = "/tmp/positions.yaml";
|
||||
clients = [
|
||||
{ url = "http://${if config.networking.hostName == "makanek" then "127.0.0.1" else "makanek.r"}:3100/loki/api/v1/push"; }
|
||||
];
|
||||
scrape_configs = [
|
||||
{
|
||||
job_name = "journal";
|
||||
journal = {
|
||||
max_age = "12h";
|
||||
labels.job = "systemd-journal";
|
||||
labels.host = config.networking.hostName;
|
||||
};
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__journal__systemd_unit" ];
|
||||
target_label = "unit";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,9 @@ let
|
||||
});
|
||||
in
|
||||
{
|
||||
containers.moodle-dl-borsfaye = {
|
||||
autoStart = true;
|
||||
config = { lib, pkgs, ...}: {
|
||||
imports = [ <niveum/modules/moodle-dl.nix> ];
|
||||
|
||||
services.moodle-dl = {
|
||||
@@ -23,4 +26,6 @@ in
|
||||
moodle_path = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,6 +45,25 @@ in
|
||||
103685 # Griechische Sprache und Übersetzung I
|
||||
105455 # Elegia greca
|
||||
105335 # Homerische Epen
|
||||
|
||||
# WS 2021
|
||||
108122 # Griechisch
|
||||
107986 # Altostslavisch
|
||||
107792 # Elegie in Rom
|
||||
107369 # Tusculanae Disputationes
|
||||
108586 # Griechische Religion
|
||||
107988 # Balkanindogermanisch
|
||||
108312 # Altnordisch
|
||||
107281 # NLP
|
||||
108736 # Grammatiktheorie
|
||||
109438 # Warum klingt Orkisch böse
|
||||
108025 # Poetik der Nordgermanen
|
||||
107280 # Statistik
|
||||
108350 # Attische Redner
|
||||
107461 # Argonautika
|
||||
108283 # Digital Classicist
|
||||
109211 # Altlitauisch
|
||||
109185 # Etymologie
|
||||
];
|
||||
download_submissions = true;
|
||||
download_descriptions = true;
|
||||
@@ -56,22 +75,33 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = let moodle-dl-directory = config.services.moodle-dl.directory; in {
|
||||
fileSystems."/export/moodle" = {
|
||||
device = config.services.moodle-dl.directory;
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 2049 ];
|
||||
|
||||
services.nginx.virtualHosts."moodle.kmein.r" =
|
||||
let
|
||||
identity = lib.strings.fileContents <secrets/eduroam/identity>;
|
||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
||||
in {
|
||||
basicAuth."${identity}" = password;
|
||||
locations."/" = {
|
||||
root = config.services.moodle-dl.directory;
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
charset UTF-8;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
user = "moodle-dl"; # config.users.extraUsers.moodle.name;
|
||||
openDefaultPorts = true;
|
||||
configDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
dataDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
declarative = rec {
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
devices = {
|
||||
inherit ((import <niveum/lib>).syncthing.devices) wilde manakish toum;
|
||||
};
|
||||
folders.${moodle-dl-directory} = {
|
||||
devices = [ "toum" "wilde" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
};
|
||||
exports = let machines = with (import <niveum/lib>).retiolumAddresses; [kabsa manakish]; in ''
|
||||
/export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines}
|
||||
/export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ in {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
ytdl-format = "bestvideo+bestaudio/best";
|
||||
osc = "no";
|
||||
ytdl-raw-options = lib.concatStringsSep "," [ ''sub-lang="de,en"'' "write-sub=" "write-auto-sub=" ];
|
||||
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
||||
};
|
||||
bindings = {
|
||||
"Alt+RIGHT" = "add video-rotate 90";
|
||||
@@ -23,7 +22,6 @@ in {
|
||||
"Alt+j" = "add video-pan-y -0.05";
|
||||
};
|
||||
scripts = [
|
||||
pkgs.mpvScripts.thumbnail
|
||||
nixpkgs-unstable.mpvScripts.youtube-quality
|
||||
];
|
||||
};
|
||||
|
||||
38
configs/names.nix
Normal file
38
configs/names.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
port = 5703;
|
||||
geogen = (pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "scripts";
|
||||
rev = "8945430f27a8c6fd632dd35382cb094abe3543ff";
|
||||
sha256 = "1djyxkynypxsrmdf6idgjszqpcgqyq607rrsvl58p2bpymmwibzb";
|
||||
}) + "/onomastics";
|
||||
inherit (pkgs.callPackage geogen {}) dependencyEnv;
|
||||
in
|
||||
{
|
||||
systemd.services.names = {
|
||||
wants = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Better clone of geogen.stoepel.net";
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
};
|
||||
script = ''
|
||||
cd $(mktemp -d)
|
||||
ln -s "${geogen}/wsgi.py" wsgi.py
|
||||
${dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."names.kmein.r" = {
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
}
|
||||
248
configs/neomutt.nix
Normal file
248
configs/neomutt.nix
Normal file
@@ -0,0 +1,248 @@
|
||||
{ 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<>\"]"
|
||||
''}
|
||||
'';
|
||||
}
|
||||
@@ -25,18 +25,13 @@
|
||||
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
|
||||
packages.nvim = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
# cheat-sh-vim
|
||||
# deoplete-nvim
|
||||
# vim-abolish
|
||||
ale
|
||||
fzf-vim
|
||||
fzfWrapper
|
||||
goyo
|
||||
supertab
|
||||
undotree
|
||||
tabular
|
||||
vimwiki
|
||||
vim-256noir
|
||||
vim-colors-paramount
|
||||
vim-commentary
|
||||
vim-css-color
|
||||
@@ -44,13 +39,9 @@
|
||||
vim-fetch
|
||||
vim-fugitive
|
||||
vim-gitgutter
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax # vim-pandoc-after
|
||||
vim-repeat
|
||||
vim-sensible
|
||||
# vim-startify
|
||||
vim-surround
|
||||
vim-mail
|
||||
];
|
||||
opt = [
|
||||
csv
|
||||
@@ -72,6 +63,9 @@
|
||||
vim-reason-plus
|
||||
vim-toml
|
||||
vimtex
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax # vim-pandoc-after
|
||||
vim-256noir
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
100
configs/networkmanager.nix
Normal file
100
configs/networkmanager.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
autowifi = pkgs.writers.writePython3Bin "autowifi" { flakeIgnore = [ "E501" ]; } <stockholm/lass/5pkgs/autowifi/autowifi.py>;
|
||||
profile = name: custom: lib.recursiveUpdate {
|
||||
connection.id = name;
|
||||
connection.type = "wifi";
|
||||
connection.interface-name = "wlp3s0";
|
||||
connection.permissions = "";
|
||||
wifi.mac-address-blacklist = "";
|
||||
wifi.ssid = name;
|
||||
wifi.mode = "infrastructure";
|
||||
ipv4.dns-search = "";
|
||||
ipv4.method = "auto";
|
||||
ipv6.addr-gen-mode = "stable-privacy";
|
||||
ipv6.dns-search = "";
|
||||
ipv6.method = "auto";
|
||||
proxy = {};
|
||||
} custom;
|
||||
eduroamProfile = {
|
||||
connection.uuid = "eae9fee6-a7d2-4120-a609-440b457d6fcf";
|
||||
wifi-security = {
|
||||
group = "ccmp;tkip;";
|
||||
key-mgmt = "wpa-eap";
|
||||
pairwise = "ccmp;";
|
||||
proto = "rsn;";
|
||||
};
|
||||
"802-1x" = {
|
||||
altsubject-matches = "DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de;";
|
||||
anonymous-identity = "anonymous@wlan.hu-berlin.de";
|
||||
ca-cert = pkgs.fetchurl {
|
||||
url = "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
|
||||
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
|
||||
};
|
||||
eap = "ttls;";
|
||||
identity = lib.strings.fileContents <secrets/eduroam/identity>;
|
||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
||||
phase2-auth = "pap";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ../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" ];
|
||||
|
||||
systemd.services.autowifi = {
|
||||
enable = false;
|
||||
description = "Automatic wifi connector";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.networkmanager ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = "10s";
|
||||
ExecStart = "${autowifi}/bin/autowifi";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.speedtest-cli ];
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
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";
|
||||
@@ -22,7 +24,7 @@ let
|
||||
macro , open-in-browser
|
||||
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro y set browser "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
@@ -69,5 +71,11 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.newsboat ];
|
||||
environment.systemPackages = [
|
||||
pkgs.newsboat
|
||||
(pkgs.writers.writeDashBin "mpv-watch-later" ''
|
||||
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
|
||||
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
passwordFile = path: toString (pkgs.writeText "password" (lib.strings.fileContents path));
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
in
|
||||
{
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud21;
|
||||
package = pkgs.nextcloud22;
|
||||
|
||||
https = true;
|
||||
|
||||
@@ -23,8 +24,8 @@ in
|
||||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
dbname = "nextcloud";
|
||||
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
|
||||
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
|
||||
dbpassFile = passwordFile <system-secrets/nextcloud/database>;
|
||||
adminpassFile = passwordFile <system-secrets/nextcloud/admin>;
|
||||
adminuser = "admin";
|
||||
# extraTrustedDomains = [ "toum.r" ];
|
||||
};
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
{
|
||||
# enable `nix flake`
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
# extraOptions = ''
|
||||
# experimental-features = nix-command
|
||||
# '';
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,8 +2,29 @@
|
||||
let
|
||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
||||
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
|
||||
menstruation = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
|
||||
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
||||
|
||||
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 (pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "recht";
|
||||
@@ -13,7 +34,6 @@ let
|
||||
|
||||
in {
|
||||
imports = [
|
||||
./krebs.nix
|
||||
./writing.nix
|
||||
./python.nix
|
||||
./haskell
|
||||
@@ -45,15 +65,12 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# INTERNET
|
||||
aria2
|
||||
# firefox
|
||||
firefox
|
||||
tdesktop
|
||||
w3m
|
||||
wget
|
||||
httpie
|
||||
whois
|
||||
ddgr
|
||||
ix
|
||||
nur.repos.kmein.python3Packages.instaloader
|
||||
dnsutils
|
||||
# mtr # my traceroute
|
||||
# FILE MANAGERS
|
||||
@@ -77,16 +94,14 @@ in {
|
||||
psmisc # for killall, pstree
|
||||
# SHELL
|
||||
bat # better cat
|
||||
du-dust # better du
|
||||
fd # better find
|
||||
file # determine file type
|
||||
dos2unix
|
||||
trash-cli
|
||||
ncdu # ncurses disk usage
|
||||
python3Packages.jsonschema # json validation
|
||||
jq # json toolkit
|
||||
pup # html toolkit
|
||||
jo # json creation
|
||||
nixpkgs-unstable.htmlq
|
||||
xsv # csv toolkit
|
||||
xmlstarlet # xml toolkit
|
||||
manpages
|
||||
@@ -111,6 +126,8 @@ in {
|
||||
audacity
|
||||
calibre
|
||||
inkscape
|
||||
astrolog # astrolog
|
||||
anki # flashcards
|
||||
nixpkgs-unstable.zoom-us # video conferencing
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
@@ -122,10 +139,14 @@ in {
|
||||
youtubeDL
|
||||
bc # calculator
|
||||
pari # gp -- better calculator
|
||||
scripts.auc
|
||||
scripts.infschmv
|
||||
scripts.qrpaste
|
||||
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
|
||||
@@ -133,10 +154,9 @@ in {
|
||||
scripts.devanagari
|
||||
scripts.betacode # ancient greek betacode to unicode converter
|
||||
scripts.meteo
|
||||
nur.repos.kmein.mahlzeit
|
||||
scripts.mahlzeit
|
||||
recht
|
||||
# nur.repos.kmein.slide
|
||||
nur.repos.kmein.vimv
|
||||
scripts.vimv
|
||||
scripts.swallow # window swallowing
|
||||
scripts.genius
|
||||
scripts.instaget
|
||||
@@ -155,8 +175,10 @@ in {
|
||||
scripts.vg
|
||||
scripts.fkill
|
||||
scripts.wttr
|
||||
scripts.boetlingk
|
||||
scripts.sanskrit-dictionary
|
||||
scripts.unicodmenu
|
||||
scripts.horoscope
|
||||
scripts.closest
|
||||
scripts.trans
|
||||
scripts.liddel-scott-jones
|
||||
scripts.mpv-radio
|
||||
@@ -172,19 +194,34 @@ in {
|
||||
qrencode
|
||||
wtf
|
||||
|
||||
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
|
||||
spotify-tui
|
||||
nixpkgs-unstable.spotify
|
||||
ncspot
|
||||
playerctl
|
||||
|
||||
nix-index
|
||||
scripts.nix-index-update
|
||||
|
||||
#krebs
|
||||
dic
|
||||
cyberlocker-tools
|
||||
untilport
|
||||
kpaste
|
||||
irc-announce
|
||||
git-preview
|
||||
ircaids
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ with haskellPackages; [
|
||||
directory
|
||||
dlist
|
||||
either
|
||||
edit-distance
|
||||
exceptions
|
||||
extra
|
||||
filepath
|
||||
@@ -54,6 +55,7 @@ with haskellPackages; [
|
||||
megaparsec
|
||||
microlens
|
||||
monad-logger
|
||||
monad-memo
|
||||
mono-traversable
|
||||
mtl
|
||||
network
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{ 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> { };
|
||||
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));
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
environment.systemPackages = [
|
||||
(pkgs.python3.withPackages (py: [
|
||||
py.black
|
||||
py.python-language-server
|
||||
py.pyls-mypy
|
||||
py.pyls-black
|
||||
py.pyls-isort
|
||||
# py.python-language-server
|
||||
# py.pyls-mypy
|
||||
# py.pyls-black
|
||||
# py.pyls-isort
|
||||
py.flake8
|
||||
py.pygments
|
||||
py.schema
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
||||
|
||||
zoteroStyle = { name, sha256 }: {
|
||||
name = "${name}.csl";
|
||||
path = pkgs.fetchurl {
|
||||
@@ -63,13 +65,14 @@ in {
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
nur.repos.kmein.text2pdf
|
||||
scripts.text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
# gnumeric
|
||||
dia
|
||||
pandoc
|
||||
pandoc-doc
|
||||
# proselint
|
||||
asciidoctor
|
||||
wordnet
|
||||
|
||||
@@ -3,8 +3,6 @@ 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 = {
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||
inherit (import <niveum/lib>) tmpfilesConfig serveHtml;
|
||||
|
||||
radioStore = "/var/lib/radio";
|
||||
htgenPort = 8080;
|
||||
stations = {
|
||||
meddl = {
|
||||
streamPort = 8000;
|
||||
mpdPort = 6600;
|
||||
description = ''
|
||||
Drachenlord-Radio. Kopie von <a href="https://antenne-asb.ga/">Hit Radio Antenne ASB</a>, dem Anti-Mobbing-Sender.
|
||||
<em>Hier wird nicht nur, aber auch Meddl gespielt.
|
||||
Für dich On Air einer unserer Top Moderatoren Rainer Winkler. Als einer der größten Meddler aller Zeiten, hat er sich schon in seiner Kinheit einen Namen gemacht. Auch wenn er dem Meddl zugeneigt ist und HipHop-Kaschber eigentlich hasst, spielt er mittlerweile gelegentlich auch Techno oder HipHop.</em>
|
||||
'';
|
||||
};
|
||||
lyrikline = {
|
||||
streamPort = 8001;
|
||||
mpdPort = 6601;
|
||||
@@ -72,7 +63,11 @@ in
|
||||
})
|
||||
];
|
||||
|
||||
users.extraUsers.radio.isSystemUser = true;
|
||||
users.extraUsers.radio = {
|
||||
isSystemUser = true;
|
||||
group = "radio";
|
||||
};
|
||||
users.groups.radio = {};
|
||||
|
||||
krebs.htgen.radio = {
|
||||
port = htgenPort;
|
||||
@@ -113,25 +108,6 @@ in
|
||||
)"
|
||||
url="$(cat ${radioStore}/$hash)"
|
||||
|
||||
echo "<html><body style='margin:0'><iframe style='width:100%;height:100%;border:0' src="$url"></iframe></body></html>"
|
||||
exit
|
||||
;;
|
||||
"POST /meddl/skip")
|
||||
send200
|
||||
${mpcs.meddl}/bin/mpc-meddl next
|
||||
exit
|
||||
;;
|
||||
"GET /meddl/status")
|
||||
send200
|
||||
|
||||
hash="$(
|
||||
${mpcs.meddl}/bin/mpc-meddl status -f '%file%' \
|
||||
| head -n 1 \
|
||||
| md5sum \
|
||||
| cut -d' ' -f 1
|
||||
)"
|
||||
url="$(cat ${radioStore}/$hash)"
|
||||
|
||||
echo "<html><body style='margin:0'><iframe style='width:100%;height:100%;border:0' src="$url"></iframe></body></html>"
|
||||
exit
|
||||
;;
|
||||
@@ -220,57 +196,12 @@ in
|
||||
};
|
||||
|
||||
|
||||
systemd.services.meddl = {
|
||||
after = [ "container@meddl.service" ];
|
||||
wantedBy = [ "container@meddl.service" ];
|
||||
startAt = "*:00/10";
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
preStart = "${mpcs.meddl}/bin/mpc-meddl crop || :";
|
||||
script = ''
|
||||
set -efu
|
||||
host=http://antenne-asb.ga
|
||||
|
||||
prepend_host() {
|
||||
sed "s#^#$host/#"
|
||||
}
|
||||
|
||||
${pkgs.curl}/bin/curl -sSL "$host" \
|
||||
| ${pkgs.pup}/bin/pup 'li a attr{href}' \
|
||||
| prepend_host \
|
||||
| while read -r song; do
|
||||
song_url="$(${pkgs.curl}/bin/curl -sSL "$song" \
|
||||
| ${pkgs.pup}/bin/pup 'audio source attr{src}' \
|
||||
| prepend_host
|
||||
)"
|
||||
|
||||
hash="$(echo "$song_url" | md5sum | cut -d' ' -f 1)"
|
||||
echo "$song_url ($hash) -> $song"
|
||||
echo "$song" > "${radioStore}/$hash"
|
||||
|
||||
${mpcs.meddl}/bin/mpc-meddl add "$song_url"
|
||||
done
|
||||
|
||||
${mpcs.meddl}/bin/mpc-meddl play
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."radio.xn--kiern-0qa.de" = {
|
||||
services.nginx.virtualHosts."radio.kmein.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = lib.mkMerge (
|
||||
[
|
||||
{
|
||||
"/".extraConfig = ''
|
||||
default_type "text/html";
|
||||
root ${pkgs.linkFarm "station-list" [{
|
||||
name = "index.html";
|
||||
path = import ./station-list.nix { inherit pkgs lib stations; };
|
||||
}]};
|
||||
index index.html;
|
||||
'';
|
||||
# skip
|
||||
"= /meddl/skip".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
}
|
||||
{ "/".extraConfig = serveHtml (import ./station-list.nix { inherit pkgs lib stations; }) pkgs; }
|
||||
] ++ (lib.mapAttrsToList (name: station: {
|
||||
"= /${name}/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /${name}/listen.ogg".proxyPass = "http://127.0.0.1:${toString station.streamPort}";
|
||||
|
||||
69
configs/retiolum-map.nix
Normal file
69
configs/retiolum-map.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
network = "retiolum";
|
||||
|
||||
stateDirectory = "retiolum-map";
|
||||
|
||||
geo-ip-database = "${lib.head config.services.geoipupdate.settings.EditionIDs}.mmdb";
|
||||
geo-ip-database-path = "${config.services.geoipupdate.settings.DatabaseDirectory}/${geo-ip-database}";
|
||||
|
||||
tinc-graph-source = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "tinc-graph";
|
||||
rev = "1b9c69ffdbdab82d30a23e44f739feea63d94163";
|
||||
sha256 = "0bk4x9l399f80lmz4asx7s5fcsgrfdb6xyymbq884621x4z3d2vp";
|
||||
};
|
||||
tinc-graph = pkgs.callPackage tinc-graph-source {};
|
||||
in
|
||||
{
|
||||
systemd.services.retiolum-index = {
|
||||
description = "Retiolum indexing service";
|
||||
wants = [ "tinc.${network}.service" ];
|
||||
script = ''
|
||||
${tinc-graph}/bin/tinc-graph --geoip-file ${geo-ip-database-path} --network ${network} \
|
||||
| ${pkgs.coreutils}/bin/tee network.json \
|
||||
| ${tinc-graph}/bin/tinc-statistics > statistics.json
|
||||
|
||||
cp ${tinc-graph}/static/map.html map.html
|
||||
cp ${tinc-graph}/static/map.html index.html
|
||||
cp ${tinc-graph}/static/graph.html graph.html
|
||||
'';
|
||||
startAt = "hourly";
|
||||
path = [ pkgs.coreutils pkgs.jq pkgs.tinc_pre ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
StateDirectory = stateDirectory;
|
||||
WorkingDirectory = "/var/lib/${stateDirectory}";
|
||||
};
|
||||
};
|
||||
|
||||
services.geoipupdate = {
|
||||
enable = true;
|
||||
settings = {
|
||||
AccountID = 608777;
|
||||
LicenseKey = toString <system-secrets/maxmind/license.key>;
|
||||
EditionIDs = [ "GeoLite2-City" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."graph.r".locations."/".root = "/var/lib/${stateDirectory}";
|
||||
};
|
||||
|
||||
systemd.services.geoip-share = {
|
||||
after = [ "geoipupdate.service" ];
|
||||
script = let
|
||||
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> {};
|
||||
in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ config, pkgs, ... }: {
|
||||
imports = [
|
||||
<niveum/modules/retiolum.nix>
|
||||
../modules/retiolum.nix
|
||||
];
|
||||
|
||||
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
|
||||
|
||||
@@ -4,46 +4,6 @@ let
|
||||
in{
|
||||
home-manager.users.me.programs.rofi = {
|
||||
enable = true;
|
||||
separator = "solid";
|
||||
scrollbar = false;
|
||||
borderWidth = 0;
|
||||
lines = 5;
|
||||
font = "Monospace 10";
|
||||
colors = rec {
|
||||
window = rec {
|
||||
background = colours.foreground;
|
||||
border = background;
|
||||
separator = colours.black.bright;
|
||||
};
|
||||
rows = {
|
||||
normal = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = colours.background;
|
||||
highlight = {
|
||||
foreground = colours.cyan.dark;
|
||||
inherit (window) background;
|
||||
};
|
||||
};
|
||||
active = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = colours.yellow.dark;
|
||||
highlight = {
|
||||
foreground = colours.green.dark;
|
||||
inherit (window) background;
|
||||
};
|
||||
};
|
||||
urgent = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = colours.red.dark;
|
||||
highlight = {
|
||||
foreground = colours.magenta.dark;
|
||||
inherit (window) background;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ in {
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
wilde = {
|
||||
hostname = "wilde.r";
|
||||
kabsa = {
|
||||
hostname = "kabsa.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
};
|
||||
|
||||
61
configs/tarot.nix
Normal file
61
configs/tarot.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
tarotPort = 7407;
|
||||
tarotFiles = pkgs.fetchzip {
|
||||
url = "https://c.krebsco.de/tarot.zip";
|
||||
sha256 = "0jl5vdwlj17pqp94yj02xgsb1gyvs9i08m83kac0jdnhfjl2f75a";
|
||||
stripRoot = false;
|
||||
};
|
||||
tarotKey = builtins.fetchurl {
|
||||
url = "http://c.krebsco.de/tarot.pdf";
|
||||
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
|
||||
};
|
||||
in
|
||||
{
|
||||
krebs.htgen.tarot = {
|
||||
port = tarotPort;
|
||||
user.name = "radio";
|
||||
script = ''. ${pkgs.writers.writeDash "tarot" ''
|
||||
case "$Method $Request_URI" in
|
||||
"GET /")
|
||||
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
|
||||
card=$(mktemp --tmpdir tarot.XXX)
|
||||
trap 'rm $card' EXIT
|
||||
reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1)
|
||||
if [ "$reverse" -eq 1 ]; then
|
||||
${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card"
|
||||
else
|
||||
${pkgs.coreutils}/bin/cp "$item" "$card"
|
||||
fi
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")"
|
||||
printf 'Server: %s\r\n' "$Server"
|
||||
printf 'Connection: close\r\n'
|
||||
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card")
|
||||
printf '\r\n'
|
||||
cat "$card"
|
||||
exit
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
''}'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."tarot.kmein.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}";
|
||||
"/files/" = {
|
||||
root = pkgs.linkFarm "tarot" [
|
||||
{ name = "files/key.pdf"; path = tarotKey; }
|
||||
{ name = "files/cards"; path = tarotFiles; }
|
||||
];
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
charset UTF-8;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
53
configs/telegram-bots/astrology.nix
Normal file
53
configs/telegram-bots/astrology.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||
toSymbols = pkgs.writers.writeDash "to-symbols" ''
|
||||
${pkgs.gnused}/bin/sed '
|
||||
s/\bTri\b/△/;
|
||||
s/\bOpp\b/☍/;
|
||||
s/\bSqu\b/□/;
|
||||
s/\bSex\b/⚹/;
|
||||
s/\bCon\b/☌/;
|
||||
s/Sun/☉/g;
|
||||
s/Moon/☽/g;
|
||||
s/Mercury/☿/g;
|
||||
s/Venus/♀/g;
|
||||
s/Mars/♂/g;
|
||||
s/Jupiter/♃/g;
|
||||
s/Saturn/♄/g;
|
||||
s/Uranus/♅/g;
|
||||
s/Neptune/♆/g;
|
||||
s/Pluto/♇/g;
|
||||
s/North Node/☊/g;
|
||||
s/\bLeo\b/♌/g;
|
||||
s/\bCan\(cer\)\?\b/♋/g;
|
||||
s/\bGem\(ini\)\?\b/♊/g;
|
||||
s/\bVir\(go\)\?\b/♍/g;
|
||||
s/\bLib\(ra\)\?\b/♎/g;
|
||||
s/\bTau\(rus\)\?\b/♉/g;
|
||||
s/\bAri\(es\)\?\b/♈/g;
|
||||
s/\bSco\(rpio\)\?\b/♏/g;
|
||||
s/\bPis\(ces\)\?\b/♓/g;
|
||||
s/\bSag\(ittarius\)\?\b/♐/g;
|
||||
s/\bAqu\(arius\)\?\b/♒/g;
|
||||
s/\bCap\(ricorn\)\?\b/♑/g;
|
||||
s/-->/⟶/g;
|
||||
s/\s\+/ /g; # replace multiple spaces by one
|
||||
s/^.*\([ 0-9]\{2\}:[0-9]\{2\}\) /\1 /; # remove date at beginning of line (but not everything up to v/c X:XX)
|
||||
s/^\s*//
|
||||
'
|
||||
'';
|
||||
in {
|
||||
niveum.telegramBots.transits = {
|
||||
enable = true;
|
||||
time = "4:00";
|
||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chatIds = [ "18980945" ];
|
||||
command = toString (pkgs.writers.writeDash "common-transits" ''
|
||||
{
|
||||
${nixpkgs-unstable.astrolog}/bin/astrolog -n -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto
|
||||
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $(${pkgs.coreutils}/bin/date +'%m %d %Y') -R Uranus Neptune Pluto
|
||||
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n
|
||||
'');
|
||||
};
|
||||
}
|
||||
@@ -14,6 +14,7 @@ let
|
||||
in {
|
||||
imports = [
|
||||
./literature-quote.nix
|
||||
./astrology.nix
|
||||
./autorenkalender.nix
|
||||
./nachtischsatan.nix
|
||||
./tlg-wotd.nix
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
living-room-id = 131090;
|
||||
in
|
||||
{
|
||||
imports = [ <niveum/modules/traadfri.nix> ];
|
||||
imports = [ ../modules/traadfri.nix ];
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "traadfri-party" ''
|
||||
|
||||
@@ -13,6 +13,24 @@ in
|
||||
<niveum/modules/tuna.nix>
|
||||
];
|
||||
|
||||
services.syncthing = let mpd-directory = config.services.mpd.dataDir; in {
|
||||
enable = true;
|
||||
user = config.services.mpd.user; # config.users.extraUsers.moodle.name;
|
||||
openDefaultPorts = true;
|
||||
configDir = "${mpd-directory}/.config/syncthing";
|
||||
dataDir = "${mpd-directory}/.config/syncthing";
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
devices = {
|
||||
inherit ((import <niveum/lib>).syncthing.devices) kabsa manakish heym;
|
||||
};
|
||||
folders.${config.services.mpd.musicDirectory} = {
|
||||
devices = [ "heym" "kabsa" "manakish" ];
|
||||
id = "music";
|
||||
type = "receiveonly";
|
||||
};
|
||||
};
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "0.0.0.0";
|
||||
@@ -77,21 +95,20 @@ in
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts.default = {
|
||||
virtualHosts."radio.kmein.r" = {
|
||||
basicAuth.dj = password;
|
||||
locations."= /listen.ogg" = {
|
||||
proxyPass = "http://127.0.0.1:${toString multi-room-audio-port}";
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.tuna.webPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -17,11 +17,34 @@ let
|
||||
url = "https://agnes.hu-berlin.de/lupo/rds?state=change&type=6&moduleParameter=semesterSelect&nextdir=change&next=SearchSelect.vm&subdir=applications&targettype=7&targetstate=change&getglobal=semester";
|
||||
filter = [ { css = "fieldset"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Lammla 2021";
|
||||
url = "http://lammla.info/index.php?reihe=30";
|
||||
filter = [ "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Tatort";
|
||||
url = "https://www.daserste.de/unterhaltung/krimi/tatort/vorschau/index.html";
|
||||
filter = [
|
||||
"html2text"
|
||||
"strip"
|
||||
{
|
||||
shellpipe = ''
|
||||
${pkgs.gnused}/bin/sed 's/ / /g;s/))/&\n/g;s/ \+/ /g'
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Kratylos";
|
||||
url = "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
filter = [ { element-by-id = "content"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Zeno Free E-Books";
|
||||
url = "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
filter = [ { element-by-class = "zenoCOMain"; } "html2text" "strip" ];
|
||||
}
|
||||
{
|
||||
name = "Indogermanische Forschungen";
|
||||
url = "https://www.degruyter.com/journal/key/INDO/html";
|
||||
@@ -83,6 +106,11 @@ let
|
||||
subject = "{count} changes: {jobs}";
|
||||
to = kieran.email;
|
||||
};
|
||||
telegram = {
|
||||
enabled = true;
|
||||
bot_token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chat_id = "-1001504043752";
|
||||
};
|
||||
html.diff = "unified";
|
||||
stdout = {
|
||||
color = true;
|
||||
@@ -105,8 +133,11 @@ in
|
||||
home = urlwatchDir;
|
||||
createHome = true;
|
||||
isSystemUser = true;
|
||||
group = "urlwatch";
|
||||
};
|
||||
|
||||
users.groups.urlwatch = {};
|
||||
|
||||
systemd.services.urlwatch = {
|
||||
enable = true;
|
||||
startAt = "*-*-* 05:00:00";
|
||||
@@ -117,6 +148,7 @@ in
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = config.users.extraUsers.urlwatch.name;
|
||||
Group = config.users.groups.urlwatch.name;
|
||||
WorkingDirectory = config.users.extraUsers.urlwatch.home;
|
||||
PermissionsStartOnly = "true";
|
||||
PrivateTmp = "true";
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/fetchWallpaper.nix> ];
|
||||
|
||||
krebs.fetchWallpaper = {
|
||||
enable = true;
|
||||
url = "http://prism.r/realwallpaper-krebs-stars-berlin.png";
|
||||
|
||||
@@ -23,7 +23,7 @@ in {
|
||||
'';
|
||||
weechat = pkgs.weechat.override {
|
||||
configure = { ... }: {
|
||||
scripts = [ pkgs.weechatScripts.weechat-autosort pkgs.weechatScripts.colorize_nicks ];
|
||||
scripts = [ pkgs.weechatScripts.weechat-autosort pkgs.weechatScripts.colorize_nicks pkgs.weechatScripts.weechat-matrix ];
|
||||
init = let
|
||||
coolColors = lib.lists.subtractLists (lib.range 52 69 ++ lib.range 231 248) (lib.range 31 254);
|
||||
nick = "kmein";
|
||||
@@ -40,14 +40,22 @@ in {
|
||||
|
||||
/server add hackint irc.hackint.org/6697 -ipv6 -ssl
|
||||
/server add libera irc.libera.chat/6697 -ssl
|
||||
/server add oftc irc.oftc.net/6697 -ssl -ipv6
|
||||
/server add retiolum irc.r
|
||||
/server add news news.r
|
||||
/matrix server add nibbana nibbana.jp
|
||||
|
||||
/alias add mod /quote omode $channel +o $nick
|
||||
|
||||
/relay add weechat 9000
|
||||
/set relay.network.password ${relayPassword}
|
||||
|
||||
/set matrix.server.nibbana.username ${nick}
|
||||
/set matrix.server.nibbana.password "${lib.strings.fileContents <system-secrets/matrix/nibbana>}"
|
||||
|
||||
/set irc.server.oftc.command /msg nickserv IDENTIFY ${lib.strings.fileContents <system-secrets/irc/oftc>};/msg nickserv SET CLOAK ON
|
||||
/set irc.server.oftc.autojoin "#osm,#osm-de,#home-manager"
|
||||
|
||||
/set irc.server.hackint.autojoin "#krebs,#nixos,#the_playlist"
|
||||
/set irc.server.hackint.sasl_mechanism plain
|
||||
/set irc.server.hackint.sasl_username ${nick}
|
||||
@@ -58,22 +66,25 @@ in {
|
||||
/set irc.server.libera.sasl_username ${nick}
|
||||
/set irc.server.libera.sasl_password ${lib.strings.fileContents <system-secrets/irc/libera>}
|
||||
|
||||
/set irc.server.retiolum.autojoin "#xxx,#brockman,#flix"
|
||||
/set irc.server.retiolum.autojoin "#xxx,#brockman,#flix,#autowifi"
|
||||
/set irc.server.retiolum.command "/oper aids balls"
|
||||
/set irc.server.news.autojoin "#cook,#drachengame,#oepnv,#kmeinung,#memes"
|
||||
/set irc.server.news.command "/oper aids balls"
|
||||
/set logger.level.irc.news.#all 0
|
||||
/set logger.level.irc.news 0
|
||||
|
||||
/filter addreplace corona irc.news.* * [kc]orona|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]tion|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta
|
||||
/filter addreplace zerocovid * * [kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron|epidemi|booster|r-wert
|
||||
/filter addreplace joinquit * irc_join,irc_part,irc_quit,irc_nick *
|
||||
/filter addreplace playlist_topic irc.*.#the_playlist irc_topic *
|
||||
/filter addreplace brockman_notice irc.news.* irc_notice *
|
||||
|
||||
/set irc.look.server_buffer independent
|
||||
|
||||
/connect libera
|
||||
/connect oftc
|
||||
/connect hackint
|
||||
/connect retiolum
|
||||
/connect news
|
||||
/matrix connect nibbana
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
networks = {
|
||||
"Aether" = {
|
||||
pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
priority = 10;
|
||||
};
|
||||
"Asoziales Netzwerk" = {
|
||||
pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
||||
priority = 10;
|
||||
};
|
||||
"Libertarian WiFi" = {
|
||||
pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
|
||||
priority = 9;
|
||||
};
|
||||
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
||||
"FlixBus Wi-Fi" = { };
|
||||
"FlixBus" = { };
|
||||
"FlixTrain" = { };
|
||||
"BVG Wi-Fi" = { };
|
||||
"wannseeforum" = { }; # login via curl -XPOST http://WannseeLancom.intern.:80/authen/login/ -d userid=$USER_ID -d password=$PASSWORD
|
||||
"Hotel_Krone" = { }; # login: http://192.168.10.1/
|
||||
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
|
||||
"WIFIonICE" = { }; # login: http://10.101.64.10/
|
||||
"WLAN-914742".psk = "67647139648174545446";
|
||||
"KDG-CEAA4".psk = "PBkBSmejcvM4";
|
||||
"KDG-4ECF7".psk = "Gdbwh7afw2Bx";
|
||||
"WLAN-XVMU6T".pskRaw = "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
|
||||
"c-base-public" = { };
|
||||
"discord".psk = "baraustrinken";
|
||||
"GoOnline".psk = "airbnbguest";
|
||||
"security-by-obscurity".psk = "44629828256481964386";
|
||||
"Mayflower".psk = "Fr31EsLan";
|
||||
"Born11".psk = "56LMVLbw840EGNWk0RYRqvgicx3FSO";
|
||||
"FactoryCommunityGuest".psk = "Factory4ever";
|
||||
"krebs".psk = "aidsballs";
|
||||
"b-base".pskRaw = "44040369a63d5bce4576637e8d34aeb3ed3d178011386decb99da473418e9861";
|
||||
"c-base".pskRaw = "1355ccb287407bcd0caa4a7a399367c28b1e11bf5da34dd100d4b86ac4cafe46";
|
||||
"o2-WLAN66".pskRaw = "9fc24da5ee0c7cf73321f5efa805370c246c4121413ea4f2373c0b7e41ec65e4";
|
||||
"Vodafone-8012".pskRaw = "45a998e3e07f83ae0b4f573535fb3ccfd808b364a22f349878ced889a6fffe2c";
|
||||
"yinyin".pskRaw = "ee85005d339df61e1e1a8484b96318513e15c46f222c3c06e8959fbc256569e7";
|
||||
"Light Hope".psk = "FriendsofMara63069!";
|
||||
"WG-Jung".psk = "BerlinMadridParisTokyo";
|
||||
"FRITZ!Box 7590 NT".psk = "90699935547611192380";
|
||||
"AA".psk = "Hallo1234";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||
}
|
||||
6
configs/wpa_supplicant.nix
Normal file
6
configs/wpa_supplicant.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
};
|
||||
}
|
||||
70
deploy.nix
70
deploy.nix
@@ -1,30 +1,12 @@
|
||||
let
|
||||
inherit (import ./lib/default.nix) sshPort;
|
||||
|
||||
gitFromJson = path:
|
||||
let object = importJson path;
|
||||
in {
|
||||
inherit (object) url;
|
||||
ref = object.rev;
|
||||
};
|
||||
krops = builtins.fetchGit (gitFromJson .versions/krops.json);
|
||||
krops = builtins.fetchGit { url = "https://cgit.krebsco.de/krops/"; };
|
||||
lib = import "${krops}/lib";
|
||||
pkgs = import "${krops}/pkgs" { };
|
||||
importJson = (import <nixpkgs> { }).lib.importJSON;
|
||||
|
||||
regularSystem = { path, name, address }: {
|
||||
source = lib.evalSource [{
|
||||
source = name: lib.evalSource [{
|
||||
niveum.file = toString ./.;
|
||||
system.file = toString path;
|
||||
nixos-config.symlink = "system/configuration.nix";
|
||||
|
||||
nixpkgs.git = gitFromJson .versions/nixpkgs.json // { shallow = true; };
|
||||
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json // { shallow = true; };
|
||||
home-manager.git = gitFromJson .versions/home-manager.json;
|
||||
stockholm.git = gitFromJson .versions/stockholm.json;
|
||||
retiolum.git = gitFromJson .versions/retiolum.json;
|
||||
nur.git = gitFromJson .versions/nur.json;
|
||||
nixpkgs-mozilla.git = gitFromJson .versions/nixpkgs-mozilla.json;
|
||||
system-secrets.pass = {
|
||||
dir = toString ~/.password-store;
|
||||
name = "systems/${name}";
|
||||
@@ -34,35 +16,23 @@ let
|
||||
name = "shared";
|
||||
};
|
||||
}];
|
||||
target = "root@${address}:${toString sshPort}";
|
||||
|
||||
command = targetPath: ''
|
||||
nix-shell -p git --run '
|
||||
nixos-rebuild switch -v --show-trace --flake ${targetPath}/niveum || \
|
||||
nixos-rebuild switch -v --flake ${targetPath}/niveum
|
||||
'
|
||||
'';
|
||||
|
||||
createHost = name: target: pkgs.krops.writeCommand "deploy-${name}" {
|
||||
source = source name;
|
||||
inherit command target;
|
||||
};
|
||||
inherit (pkgs.krops) writeDeploy;
|
||||
in {
|
||||
zaatar = writeDeploy "deploy-zaatar" (regularSystem {
|
||||
path = systems/zaatar;
|
||||
name = "zaatar";
|
||||
address = "zaatar.r";
|
||||
});
|
||||
wilde = writeDeploy "deploy-wilde" (regularSystem {
|
||||
path = systems/wilde;
|
||||
name = "wilde";
|
||||
address = "wilde.r";
|
||||
});
|
||||
toum = writeDeploy "deploy-toum" (regularSystem {
|
||||
path = systems/toum;
|
||||
name = "toum";
|
||||
address = "toum.r";
|
||||
}) // {
|
||||
buildTarget = "${builtins.getEnv "USER"}@localhost/${builtins.getEnv "HOME"}/.cache/krops";
|
||||
};
|
||||
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
||||
path = systems/makanek;
|
||||
name = "makanek";
|
||||
address = "makanek.r";
|
||||
});
|
||||
manakish = writeDeploy "deploy-manakish" (regularSystem {
|
||||
path = systems/manakish;
|
||||
name = "manakish";
|
||||
address = "manakish.r";
|
||||
});
|
||||
in rec {
|
||||
zaatar = createHost "zaatar" "root@zaatar.r:${toString sshPort}";
|
||||
kabsa = createHost "kabsa" "root@kabsa.r:${toString sshPort}";
|
||||
makanek = createHost "kabsa" "root@makanek.r:${toString sshPort}";
|
||||
manakish = createHost "kabsa" "root@manakish.r:${toString sshPort}";
|
||||
all = pkgs.writeScript "deploy-all"
|
||||
(lib.concatStringsSep "\n" [ zaatar kabsa makanek manakish ]);
|
||||
}
|
||||
|
||||
150
flake.lock
generated
Normal file
150
flake.lock
generated
Normal file
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1639871969,
|
||||
"narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "697cc8c68ed6a606296efbbe9614c32537078756",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-21.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"krops": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1637419569,
|
||||
"narHash": "sha256-0hxKZQIoByRDoPsfQq5qzFJioyWRX/fbpvMO2EYQ9lc=",
|
||||
"ref": "master",
|
||||
"rev": "13ae434b140035e7e2664bd5a8ef4c475413b2e0",
|
||||
"revCount": 115,
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/krops"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/krops"
|
||||
}
|
||||
},
|
||||
"nix-writers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1554228333,
|
||||
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
|
||||
"ref": "master",
|
||||
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||
"revCount": 32,
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/nix-writers"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://cgit.krebsco.de/nix-writers"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1640759603,
|
||||
"narHash": "sha256-k4d7oC6GvDV1OKxG325JUDpKtZcDUPEiddnJMOQQ/x8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e101dc111ac1e5a21efca7822417acc1cb92013a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-21.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-mozilla": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1638887313,
|
||||
"narHash": "sha256-FMYV6rVtvSIfthgC1sK1xugh3y7muoQcvduMdriz4ag=",
|
||||
"owner": "mozilla",
|
||||
"repo": "nixpkgs-mozilla",
|
||||
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mozilla",
|
||||
"repo": "nixpkgs-mozilla",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1640725200,
|
||||
"narHash": "sha256-yR8clhRTt1OBFojyBaNnNgD+om51nhuJ1OLqWqdY2Ow=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eaeea6e9337b93d2acb7c2aa27e3f4617408375a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1640724425,
|
||||
"narHash": "sha256-eGzvF96ZnrKqvQ7wnpa9OYsfBxUMV0Jdh3QGdZhbSek=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "5a32ea07d6ca5668ea06f14dffe94fb46d42c674",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"krops": "krops",
|
||||
"nix-writers": "nix-writers",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"retiolum": "retiolum",
|
||||
"stockholm": "stockholm"
|
||||
}
|
||||
},
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1640726454,
|
||||
"narHash": "sha256-twePnoB0NRhSM4zJOrUI/Zxzwx/u52ey6zA4YYGEvOc=",
|
||||
"ref": "master",
|
||||
"rev": "2a47990f16935d909930c9dd1ed6f8f2982df638",
|
||||
"revCount": 10218,
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
79
flake.nix
Normal file
79
flake.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
# imported from https://github.com/pinpox/nixos/blob/bdc0d47111d57cd19512c83538a01f9f9a3fc847/flake.nix
|
||||
# ref https://www.youtube.com/watch?v=mJbQ--iBc1U
|
||||
{
|
||||
description = "niveum systems";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-21.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# flake-utils.url = "github:numtide/flake-utils";
|
||||
# flake-compat = {
|
||||
# url = "github:edolstra/flake-compat";
|
||||
# flake = false;
|
||||
# };
|
||||
stockholm = {
|
||||
url = "git+https://cgit.lassul.us/stockholm";
|
||||
flake = false;
|
||||
};
|
||||
nix-writers = {
|
||||
url = "git+https://cgit.krebsco.de/nix-writers";
|
||||
flake = false;
|
||||
};
|
||||
krops = {
|
||||
url = "git+https://cgit.krebsco.de/krops";
|
||||
flake = false;
|
||||
};
|
||||
retiolum = {
|
||||
url = "github:krebs/retiolum";
|
||||
flake = false;
|
||||
};
|
||||
nixpkgs-mozilla = {
|
||||
url = "github:mozilla/nixpkgs-mozilla";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nix-writers, home-manager, stockholm, ... }@inputs:
|
||||
let
|
||||
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
|
||||
|
||||
defaultModules = [
|
||||
{ _module.args.inputs = inputs; }
|
||||
{
|
||||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
"${stockholm}/krebs/3modules/power-action.nix"
|
||||
"${stockholm}/krebs/3modules/fetchWallpaper.nix"
|
||||
({ pkgs, ... }: {
|
||||
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||
nixpkgs.overlays = [
|
||||
(import "${nix-writers}/pkgs")
|
||||
(import "${stockholm}/krebs/5pkgs")
|
||||
];
|
||||
})
|
||||
({ pkgs, ... }: { # https://github.com/Mic92/dotfiles/blob/50826e8f247909557975f4f193ecbb4162b07310/nixos/modules/upgrade-diff.nix
|
||||
system.activationScripts.diff = ''
|
||||
${pkgs.nix}/bin/nix store diff-closures /run/current-system "$systemConfig"
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
];
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
kabsa = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModules ++ [
|
||||
systems/kabsa/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -7,6 +7,12 @@ rec {
|
||||
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
||||
};
|
||||
|
||||
serveHtml = file: pkgs: ''
|
||||
default_type "text/html";
|
||||
root ${pkgs.linkFarm "fahrplan" [{ name = "index.html"; path = file; }]};
|
||||
index index.html;
|
||||
'';
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
colours = import ./colours/mac-os.nix;
|
||||
@@ -28,6 +34,8 @@ rec {
|
||||
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
|
||||
retiolumAddresses = import ./retiolum-network.nix;
|
||||
|
||||
localAddresses = import ./local-network.nix;
|
||||
|
||||
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||
@@ -43,10 +51,11 @@ rec {
|
||||
};
|
||||
|
||||
syncthing.devices = {
|
||||
wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
heym.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
||||
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
|
||||
};
|
||||
|
||||
ignorePaths = [
|
||||
|
||||
@@ -94,21 +94,47 @@ in {
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 60 * 60;
|
||||
command = pkgs.writers.writeDash "vax" ''
|
||||
${pkgs.curl}/bin/curl -sSL https://api.corona-zahlen.org/vaccinations \
|
||||
| ${pkgs.jq}/bin/jq -r '"💉 Ⅰ \(.data.quote * 1000 | floor | . / 10)% Ⅱ \(.data.secondVaccination.quote * 1000 | floor | . / 10)%"'
|
||||
interval = 60 * 5;
|
||||
command = let inherit (import <niveum/configs/spacetime.nix>) location; in "${pkgs.scripts.horoscope}/bin/horoscope --latitude=${toString location.latitude} --longitude=${toString location.longitude}";
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 60 * 5;
|
||||
command = let spacetime = import <niveum/configs/spacetime.nix>; in pkgs.writers.writePython3 "sun.py" { libraries = [ pkgs.python3Packages.astral ]; flakeIgnore = [ "E121" "E501" ]; }
|
||||
''
|
||||
import astral
|
||||
import astral.moon
|
||||
import astral.sun
|
||||
import math
|
||||
|
||||
moon_phases = {
|
||||
0: "🌑",
|
||||
3.5: "🌒",
|
||||
7: "🌓",
|
||||
10.5: "🌔",
|
||||
14: "🌕",
|
||||
17.5: "🌖",
|
||||
21: "🌗",
|
||||
24.5: "🌘",
|
||||
28: "🌑",
|
||||
}
|
||||
current_phase = astral.moon.phase()
|
||||
closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x))
|
||||
|
||||
moon_percentage = round(100 * math.sin(current_phase / 28 * math.pi), 1)
|
||||
|
||||
city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude})
|
||||
sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone)
|
||||
|
||||
print("🌅 {} 🌇 {} {} {}%".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], moon_percentage))
|
||||
'';
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 30;
|
||||
command =
|
||||
let query = "tag:unread AND tag:inbox";
|
||||
in pkgs.writers.writeDash "count-new-mail" ''
|
||||
mail_count="$(${pkgs.notmuch}/bin/notmuch search ${lib.escapeShellArg query} | wc -l)"
|
||||
[ "$mail_count" = 0 ] && printf "📭" || printf "📬"
|
||||
echo "$mail_count"
|
||||
interval = 60 * 60;
|
||||
command = pkgs.writers.writeDash "vax" ''
|
||||
${pkgs.curl}/bin/curl -sSL https://api.corona-zahlen.org/vaccinations \
|
||||
| ${pkgs.jq}/bin/jq -r '"💉 Ⅰ \(.data.quote * 1000 | floor | . / 10)% Ⅱ \(.data.secondVaccination.quote * 1000 | floor | . / 10)%"'
|
||||
'';
|
||||
}
|
||||
(let service = "openvpn-hu-berlin"; in {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
toum = "192.168.178.24";
|
||||
zaatar = "192.168.178.21";
|
||||
wilde = "192.168.178.32";
|
||||
kabsa = "192.168.178.32";
|
||||
android = "192.168.178.35";
|
||||
manakish = "192.168.178.29";
|
||||
|
||||
|
||||
482
lib/radiorecord.json
Normal file
482
lib/radiorecord.json
Normal file
@@ -0,0 +1,482 @@
|
||||
[
|
||||
{
|
||||
"station": "Record",
|
||||
"desc": "Танцевальный мейнстрим",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/record_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rr_main96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Party 24/7",
|
||||
"desc": "Нон-стоп вечеринка с зарубежными танцевальными хитами",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/party-24-7_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/party96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Organic",
|
||||
"desc": "Легкий грув. В стиле Tim Green и Sebastien Leger",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/organic_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/organic96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Chill House",
|
||||
"desc": "Легкий, мелодичный вайб",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/chillhouse_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/chillhouse96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Lo-Fi",
|
||||
"desc": "Ламповый бит и треск винила. В стиле Nujabes и J Dilla",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/lofi_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/lofi96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Dream Pop",
|
||||
"desc": "Лёгкий вайб для отдыха и хорошего настроения",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/dream-pop_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/dreampop96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Ambient",
|
||||
"desc": "Атмосферный саунд",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/ambient_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/ambient96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Innocence",
|
||||
"desc": "Techno, Minimal, Deep. Саунд как у Solomun, Boris Brejcha и Nina Kravitz",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/ibiza_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/ibiza96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Deep",
|
||||
"desc": "Глубокое house-звучание",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/deep_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/deep96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Tech House",
|
||||
"desc": "На стыке хауса и техно. В стиле Fisher и Dont Blink",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/techouse_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/techouse96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Russian Mix",
|
||||
"desc": "Русские хиты в танцевальной обработке: Zivert, Niletto, Rasa",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rus_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rus96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Chill-Out",
|
||||
"desc": "Расслабляющий вайб",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/chil_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/chil96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Pirate Station",
|
||||
"desc": "Лучшее из drum & bass: Pendulum, Chase & Status, Camo & Krooked",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/ps_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/ps96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Маятник Фуко",
|
||||
"desc": "Новая школа русского рэпа без цензуры: Morgenshtern, Markul, Obladaet & co. [18+]",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mf_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mf96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Black Rap",
|
||||
"desc": "Рэп на английском",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/yo_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/yo96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Trancemission",
|
||||
"desc": "Лучшее из транс-музыки: Armin, Above & Beyond, Christina Novelli",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/tm_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/tm96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Megamix",
|
||||
"desc": "Mash-up из главных хитов Рекорда со скоростью 5 треков в минуту! ",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mix_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mix96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Record Gold",
|
||||
"desc": "Хиты Рекорда эпохи Avicii и Swedish House Mafia",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/gold_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/gold96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Big Hits",
|
||||
"desc": "Зарубежные танцевальные хиты: Dua Lipa, Ave Max, Sia",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/bighits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/bighits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Remix",
|
||||
"desc": "Иностранные хиты в танцевальной обработке: Black Eyed Peas, Ariana Grande, Ed Sheeran",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rmx_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rmx96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Russian Hits",
|
||||
"desc": "Русский танцевальный поп: Клава Кока, Niletto, Тима Белорусских",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/russianhits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/russianhits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Summer Dance",
|
||||
"desc": "Летние клубные хиты 24/7",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/summer-dance_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/summerparty96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Супердискотека 90-х",
|
||||
"desc": "Танцевальные боевики нашей юности Руки Вверх, 2 Unlimited, Masterboy",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/sd90_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/sd9096.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Russian Gold",
|
||||
"desc": "Российские хиты в ремиксах",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/russiangold_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/russiangold96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Bass House",
|
||||
"desc": "Современный house с характерным басом: Malaa, Volac, Valentino Khan",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/jackin_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/jackin96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "VIP House",
|
||||
"desc": "Изысканный саунд закрытых вечеринок",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/vip_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/vip96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Trance Classics",
|
||||
"desc": "Главные хиты trance-музыки: Above&Beyond, Armin van Buuren, Ferry Corsten",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/trancehits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/trancehits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "House Hits",
|
||||
"desc": "Свежие house-новинки",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/househits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/househits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "EDM",
|
||||
"desc": "Музыка стадионов. ",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/club_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/club96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Minimal/Tech",
|
||||
"desc": "Саунд изысканных и дорогих party",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mini_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mini96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Tropical",
|
||||
"desc": "Жаркий и солнечный house",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/trop_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/trop96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "House Classics",
|
||||
"desc": "Золотой фонд мелодичных house-хитов",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/houseclss_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/houseclss96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "D'n'B Classics",
|
||||
"desc": "Золотые хиты drum'n'bass Aphrodite, Pendulum, Sub Focus",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/drumhits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/drumhits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "EDM Classics",
|
||||
"desc": "Фестивальные гимны",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/edmhits_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/edmhits96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Future House",
|
||||
"desc": "Future и Jackin' house: Don Diablo, Tchami, Oliver Heldens",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/fut_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/fut96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Trap",
|
||||
"desc": "Главные Trap-хиты: Yellow Claw, Apashe, DJ Snake",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/trap_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/trap96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Rap Classics",
|
||||
"desc": "Хип-хоп золотого периода: 2Pac, Cypress Hill, Notorius BIG, ONYX",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rapclassics_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rapclassics96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Progressive",
|
||||
"desc": "Лучшее из progressive trance & house",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/progr_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/progr96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Breaks",
|
||||
"desc": "Лучшее из breakbit, nu breaks и jungle",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/brks_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/brks96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Trancehouse",
|
||||
"desc": "Trancehouse - сочетание трансовой мелодики и хаусового бита.",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/trancehouse_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/trancehouse96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Rap Hits",
|
||||
"desc": "Рэп новой волны из России и из-за рубежа",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rap_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rap96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "GOA/PSY",
|
||||
"desc": "Психоделический и Goa-trance",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/goa_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/goa96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Dream Dance",
|
||||
"desc": "Мелодичный trance 90х-00х: Robert Miles, ATB, Blank&Jones",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/dream_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/dream96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Uplifting",
|
||||
"desc": "Атмосферный и космический trance",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/uplift_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/uplift96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Electro",
|
||||
"desc": "Лучшее в Electro-house: Wolfgang Gatner, Knife Party, Curbi",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/elect_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/elect96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Future Bass",
|
||||
"desc": "Flume, Illenium, Marshmello",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/fbass_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/fbass96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Neurofunk",
|
||||
"desc": "Технологичный и стремительный бит: Black Sun Empire, Dimension, Camo & Krooked",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/neurofunk_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/neurofunk96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Dancecore",
|
||||
"desc": "Dance на скорости до 150bpm",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/dc_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/dc96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Liquid Funk",
|
||||
"desc": "Атмосферный drum'b'bass",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/liquidfunk_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/liquidfunk96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Eurodance",
|
||||
"desc": "Дискотечные бэнгеры 90-х: Culture Beat, Haddaway, La Bouche",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/eurodance_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/eurodance96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Dubstep",
|
||||
"desc": "Басы на максимум!",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/dub_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/dub96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Technopop",
|
||||
"desc": "Технопоп эпохи 90-х: E-Type, Masterboy, Culture Beat",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/technopop_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/technopop96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Techno",
|
||||
"desc": "Техно для тех, кто любит пожёстче",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/techno_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/techno96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Disco/Funk",
|
||||
"desc": "Disco-саунд нового тысячелетия",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/discofunk_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/discofunk96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Hardstyle",
|
||||
"desc": "Маршевый бас и мелодичный лид: бескомпромиссная смесь",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/teo_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/teo96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Tecktonik",
|
||||
"desc": "Стиль, породивший танцевальный бум 2000-х",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/tecktonik_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/tecktonik96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Midtempo",
|
||||
"desc": "Dance на минималках",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mt_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mt96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Synthwave",
|
||||
"desc": "Вайб в стиле электронной музыки 80-х",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/synth_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/synth96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Old School",
|
||||
"desc": "Саунд рейвов начала 00-х: DJ Aligator, Klubbheads, Club Caviar",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/pump_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/pump96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Hard Bass",
|
||||
"desc": "Расколбас родившийся в Петербурге.",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/hbass_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/hbass96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Darkside",
|
||||
"desc": "Тёмная сторона drum'n'bass: Noisia, Panacea, Limewax",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/darkside_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/darkside96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Hypnotic",
|
||||
"desc": "Идеальный бэкграунд для работы или поездки в авто",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/hypno_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/hypno96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Moombahton",
|
||||
"desc": "Синтез house- и reggae-ритмов.",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mmbt_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mmbt96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "2-step",
|
||||
"desc": "Атмосферные синкопированные ритмы",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/2step_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/2step96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Groove/Tribal",
|
||||
"desc": "Этнический бит",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/groovetribal_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/groovetribal96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Christmas",
|
||||
"desc": "Музыка с запахом мандаринов и хвои. Новогоднее настроение 24/7",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/christmas-radio_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/christmas96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Rave FM",
|
||||
"desc": "Первоапрельский спецпроект",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rave_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rave96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Jungle",
|
||||
"desc": "История и современность jungle-музыки: DJ Hype, Shy FX, Ed Rush",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/jungle_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/jungle96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Complextro",
|
||||
"desc": "Синтез house и dubstep",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/complextro_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/complextro96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Гоп FM",
|
||||
"desc": "Первоапрельский спецпроект. Памп и лоходенс",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/gop_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/gop96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Rock",
|
||||
"desc": "Первоапрельский спецпроект: от Цоя до Metallica",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rock_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rock96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "60's Dance",
|
||||
"desc": "Танцевальная музыка эпохи рок-н-ролла",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/cadillac_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/cadillac96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "70's Dance",
|
||||
"desc": "Легендарный грув. Abba, Boney M, Bee Gees",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/1970_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/197096.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Record 80-х",
|
||||
"desc": "Ритмы советской и зарубежной эстрады. C. C. Catch, Modern Talking, В. Леонтьев и Ласковый Май",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/1980_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/198096.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Руки Вверх!",
|
||||
"desc": "24 часа в сутки - только песни Руки Вверх!",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/rv19_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/rv96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Веснушка FM",
|
||||
"desc": "Первоапрельский спецпроект: песни детства",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/deti_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/deti96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Медляк FM",
|
||||
"desc": "Первоапрельский спецпроект",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/mdl_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/mdl96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Нафталин FM",
|
||||
"desc": "Первоапрельский спецпроект",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/naft_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/naft96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Гастарбайтер FM",
|
||||
"desc": "Первоапрельский спецпроект",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/gast_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/gast96.aacp"
|
||||
},
|
||||
{
|
||||
"station": "Симфония FM",
|
||||
"desc": "Первоапрельский спецпроект: Моцарт, Бетховен, Чайковский & co.",
|
||||
"logo": "https://radiorecord.ru/upload/stations_images/symph_image600_colored_fill.png",
|
||||
"stream": "https://radiorecord.hostingradio.ru/symph96.aacp"
|
||||
}
|
||||
]
|
||||
21
lib/retiolum-network.nix
Normal file
21
lib/retiolum-network.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
kabsa = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
|
||||
zaatar = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
|
||||
makanek = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
|
||||
manakish = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
}
|
||||
122
lib/streams.nix
122
lib/streams.nix
@@ -2,6 +2,9 @@
|
||||
# DI generated via: cat /tmp/di-fm.html| pup '.channel-tile-component json{}' | jq 'map({logo: .children[0].children[1].children[1].src | sub("^"; "http:"), station: .children[3].children[0].children[0].text, desc: .children[3].children[1].text | gsub("\\s+"; " ")})' > /tmp/di-fm.json
|
||||
# soma.fm generated via: curl https://somafm.com/ | pup '.cbshort json{}' | jq 'map({logo:.children[0].children[0].src|sub("^"; "http://soma.fm"), desc: .children[2].text, station: .children[1].text})'
|
||||
let
|
||||
# https://github.com/NixOS/nixpkgs/blob/bc06c93905f60a82d6ebbb78f78cf289257860cc/lib/trivial.nix#L281-L282
|
||||
importJSON = path: builtins.fromJSON (builtins.readFile path);
|
||||
|
||||
di-fm-name = name: "${name} | DI.FM";
|
||||
di-fm = name: "http://prem2.di.fm/${name}_hi?${di-fm-key}";
|
||||
|
||||
@@ -47,18 +50,12 @@ in [
|
||||
desc = "Diminutive from lassus (“weary, faint, tired”). A programming human. Doing superior professional art.";
|
||||
}
|
||||
{
|
||||
stream = "https://radio.xn--kiern-0qa.de/meddl/listen.ogg";
|
||||
station = "Meddl";
|
||||
logo = "https://antenne-asb.ga/logo.png";
|
||||
desc = "Forked from antenne-asb.ga: Radiosender zum Youtuber Drachenlord. Hier läuft den ganzen Tag Drachenlord Musik von Haidern oder Podcasts zum Lord.";
|
||||
}
|
||||
{
|
||||
stream = "https://radio.xn--kiern-0qa.de/lyrik/listen.ogg";
|
||||
stream = "https://radio.kmein.de/lyrik/listen.ogg";
|
||||
station = "Lyrik";
|
||||
desc = "Lyrik-Lesung rund um die Uhr.";
|
||||
}
|
||||
{
|
||||
stream = "https://radio.xn--kiern-0qa.de/lyrikline/listen.ogg";
|
||||
stream = "https://radio.kmein.de/lyrikline/listen.ogg";
|
||||
station = "Lyrikline";
|
||||
logo = "https://www.lyrikline.org/themes/lyrik/svg/Logo_lyrikline_pure.svg";
|
||||
desc = "24/7 zufällige Wiedergaben von lyrikline.org.";
|
||||
@@ -95,6 +92,10 @@ in [
|
||||
logo = "http://radio-rb.de/img/site/logo.png";
|
||||
desc = "Голос нашего города ...";
|
||||
}
|
||||
] ++
|
||||
# generated via: curl https://radiorecord.ru/api/stations | jq '.result.stations | sort_by(.sort) | map({station:.title,desc:.tooltip,logo:.icon_fill_colored,stream:.stream_320})' > radiorecord.json
|
||||
importJSON ./radiorecord.json
|
||||
++ [
|
||||
{
|
||||
desc = "Your favorite dance tunes from the start of the decade. Familiar hits and overlooked classics in abundance.";
|
||||
logo = "http://cdn-images.audioaddict.com/1/4/0/3/5/b/14035b0944a3c2e77852b6d0944f381e.jpg?size=180x180";
|
||||
@@ -1428,106 +1429,6 @@ in [
|
||||
station = "Paradiso Nashville";
|
||||
logo = "https://www.paradiso.de/wp-content/uploads/2019/11/191111_Paradiso-Nashville.jpg";
|
||||
}
|
||||
{
|
||||
stream = radiorecord "1970";
|
||||
station = radiorecord-name "1970";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "1980";
|
||||
station = radiorecord-name "1980";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "2step";
|
||||
station = radiorecord-name "2step";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "cadillac";
|
||||
station = radiorecord-name "Cadillac";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "darkside";
|
||||
station = radiorecord-name "Darkside";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "dc";
|
||||
station = radiorecord-name "Dancecore";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "dream";
|
||||
station = radiorecord-name "Dream Dance";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "fbass";
|
||||
station = radiorecord-name "Future Bass";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "gast";
|
||||
station = radiorecord-name "Gastarbaiter FM";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "hbass";
|
||||
station = radiorecord-name "Hardbass";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "mf";
|
||||
station = radiorecord-name "FuckO";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "rap";
|
||||
station = radiorecord-name "Rap";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "rock";
|
||||
station = radiorecord-name "Rock";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "rus";
|
||||
station = radiorecord-name "Russian Mix";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "russianhits";
|
||||
station = radiorecord-name "Russian Hits";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "rv";
|
||||
station = radiorecord-name "Ruki Vverh Hits";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "symph";
|
||||
station = radiorecord-name "Symphony";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "synth";
|
||||
station = radiorecord-name "Synthwave";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "tm";
|
||||
station = radiorecord-name "Trancemission";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = radiorecord "uplift";
|
||||
station = radiorecord-name "Uplifting";
|
||||
logo = radiorecord-logo;
|
||||
}
|
||||
{
|
||||
stream = stereoscenic "mod-h";
|
||||
station = stereoscenic-name "Ambient Modern";
|
||||
@@ -1605,4 +1506,9 @@ http://94.23.221.158:9163/stream
|
||||
Greek radio
|
||||
http://radio.hostchefs.net:8046/stream?1520818130148
|
||||
|
||||
: http://audiokrishna.com/stations/japa2.mp3
|
||||
http://185.105.4.53:2339//;stream.mp3
|
||||
http://cast5.servcast.net:1390/;stream.mp3
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -58,7 +58,7 @@ set wrap
|
||||
set nohlsearch
|
||||
set clipboard=unnamedplus
|
||||
set nopaste
|
||||
set list listchars=tab:⇥\ ,extends:❯,precedes:❮,nbsp:␣,trail:· showbreak=↪
|
||||
set list listchars=tab:⇥\ ,extends:❯,precedes:❮,nbsp:␣,trail:· showbreak=¬
|
||||
set foldlevelstart=30
|
||||
|
||||
iabbrev ddate <C-R>=strftime("%F")<CR>
|
||||
@@ -132,6 +132,7 @@ if has("autocmd")
|
||||
autocmd bufnewfile,bufread *.jq packadd jq.vim
|
||||
autocmd bufnewfile,bufread *.re packadd vim-reason-plus | set filetype=reason
|
||||
autocmd bufnewfile,bufread *.journal packadd vim-ledger | set filetype=ledger shiftwidth=4
|
||||
autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax
|
||||
autocmd bufnewfile,bufread urls,config set filetype=conf
|
||||
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
||||
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
|
||||
@@ -202,7 +203,10 @@ let g:ale_fixers = {
|
||||
\ 'rust': ['rustfmt']
|
||||
\}
|
||||
let g:ale_set_quickfix = 1
|
||||
|
||||
let g:ale_fix_on_save = 1
|
||||
autocmd bufnewfile,bufread elm.json let g:ale_fix_on_save = 0
|
||||
|
||||
let g:ale_completion_enabled = 1
|
||||
|
||||
"if exists("g:loaded_airline")
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.niveum.dropbox;
|
||||
in {
|
||||
options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.dropbox-cli ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 17500 ];
|
||||
allowedUDPPorts = [ 17500 ];
|
||||
};
|
||||
|
||||
systemd.user.services.dropbox = {
|
||||
description = "Dropbox synchronisation service";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
||||
KillMode = "control-group"; # upstream recommends process
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
Nice = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -56,6 +56,7 @@ in {
|
||||
users.users.moodle-dl = {
|
||||
isSystemUser = true;
|
||||
home = cfg.directory;
|
||||
group = "moodle-dl";
|
||||
};
|
||||
|
||||
users.groups.moodle-dl = {};
|
||||
|
||||
50
modules/networkmanager-declarative.nix
Normal file
50
modules/networkmanager-declarative.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
# https://github.com/jmackie/nixos-networkmanager-profiles/
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
nm = config.networking.networkmanager;
|
||||
|
||||
mkProfile = profileAttrs:
|
||||
if !(isAttrs profileAttrs) then
|
||||
throw "error 1"
|
||||
else {
|
||||
enable = true;
|
||||
mode = "0400"; # readonly (user)
|
||||
text = (foldlAttrs (accum:
|
||||
{ name, value }: ''
|
||||
${accum}
|
||||
|
||||
[${name}] ${mkProfileEntry value}'')
|
||||
"# Generated by nixos-networkmanager-profiles" profileAttrs) + "\n";
|
||||
};
|
||||
|
||||
mkProfileEntry = entryAttrs:
|
||||
if !(isAttrs entryAttrs) then
|
||||
throw "error 2"
|
||||
else
|
||||
foldlAttrs (accum:
|
||||
{ name, value }: ''
|
||||
${accum}
|
||||
${name}=${toString value}'') "" entryAttrs;
|
||||
|
||||
foldlAttrs = op: nul: attrs:
|
||||
foldl (accum: { fst, snd }: op accum (nameValuePair fst snd)) nul
|
||||
(lists.zipLists (attrNames attrs) (attrValues attrs));
|
||||
|
||||
attrLength = attrs: length (attrValues attrs);
|
||||
|
||||
in {
|
||||
options.networking.networkmanager.profiles = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
};
|
||||
|
||||
config = mkIf (attrLength nm.profiles > 0) {
|
||||
environment.etc = (foldlAttrs (accum:
|
||||
{ name, value }:
|
||||
accum // {
|
||||
"NetworkManager/system-connections/${name}.nmconnection" =
|
||||
mkProfile value;
|
||||
}) { } nm.profiles);
|
||||
};
|
||||
}
|
||||
@@ -34,6 +34,7 @@ in {
|
||||
(name: _: builtins.readFile "${<retiolum/hosts>}/${name}")
|
||||
(builtins.readDir <retiolum/hosts>);
|
||||
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
||||
ed25519PrivateKeyFile = toString <system-secrets/retiolum.ed25519>;
|
||||
extraConfig = ''
|
||||
LocalDiscovery = yes
|
||||
AutoConnect = yes
|
||||
|
||||
@@ -6,8 +6,8 @@ let
|
||||
traadfri-package = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "traadfri";
|
||||
rev = "a55b778cf4c7f124e75070b056c90f5a8043bc45";
|
||||
sha256 = "10ggqksdbgmcwc2f3xs6abjf9zpvv554xfl3b3bblmfijgr6srv9";
|
||||
rev = "cf46bd09cd3263b90a09b0ca979aa705a4c3671c";
|
||||
sha256 = "0az9q38pl8fqk00488blhn6rhvwsw2wky3dbdlyz7945ggvxnbyd";
|
||||
};
|
||||
in pkgs.callPackage traadfri-package {
|
||||
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
|
||||
|
||||
@@ -76,7 +76,11 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers.tuna.isSystemUser = true;
|
||||
users.users.tuna = {
|
||||
isSystemUser = true;
|
||||
group = "tuna";
|
||||
};
|
||||
users.groups.tuna = {};
|
||||
# ref https://github.com/florianheinemann/MPD.FM/blob/9d037cf87597b26ae2f10ba9feea48946ad6cc68/service/MPD.FM.service
|
||||
systemd.services.tuna = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
self: super:
|
||||
with super.lib;
|
||||
let
|
||||
eval = import <nixpkgs/nixos/lib/eval-config.nix>;
|
||||
paths = (eval {modules = [(import <nixos-config>)];}).config.nixpkgs.overlays;
|
||||
in foldl' (flip extends) (_: super) paths self
|
||||
27
packages/daybook.nix
Normal file
27
packages/daybook.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib, stdenv, makeWrapper, pandoc, fetchFromGitHub }:
|
||||
stdenv.mkDerivation {
|
||||
name = "daybook";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "daybook";
|
||||
rev = "db2c34830e09183c80f3381bf5e4c44d52f05d53";
|
||||
sha256 = "0nbsv8f12qh5spq7zhimhdf3p7msk33xrb0ilqvlc6jmlkpislmv";
|
||||
};
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ pandoc ];
|
||||
buildPhase = ''
|
||||
mkdir -p $out/man/man1
|
||||
pandoc --standalone --to man daybook.1.md -o $out/man/man1/daybook.1
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install daybook $out/bin
|
||||
wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ;
|
||||
'';
|
||||
meta = with lib; {
|
||||
homepage = https://github.com/kmein/daybook;
|
||||
description = "A diary writing utility in sh";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
29
packages/depp.nix
Normal file
29
packages/depp.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ lib, writeShellScriptBin }:
|
||||
let
|
||||
aliasFlag = name: value: "-c alias.${name}=${lib.escapeShellArg value}";
|
||||
aliases = {
|
||||
eroeffne = "init";
|
||||
machnach = "clone";
|
||||
zieh = "pull";
|
||||
fueghinzu = "add";
|
||||
drueck = "push";
|
||||
pfusch = "push --force";
|
||||
zweig = "branch";
|
||||
verzweige = "branch";
|
||||
uebergib = "commit";
|
||||
erde = "rebase";
|
||||
unterscheide = "diff";
|
||||
vereinige = "merge";
|
||||
bunkere = "stash";
|
||||
markiere = "tag";
|
||||
nimm = "checkout";
|
||||
tagebuch = "log";
|
||||
zustand = "status";
|
||||
};
|
||||
in writeShellScriptBin "depp" ''
|
||||
if [ $# -gt 0 ]; then
|
||||
git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@"
|
||||
else
|
||||
printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n"
|
||||
fi
|
||||
''
|
||||
28
packages/devour.nix
Normal file
28
packages/devour.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ lib, stdenv, xdo, makeWrapper, fetchFromGitHub }:
|
||||
stdenv.mkDerivation {
|
||||
name = "devour";
|
||||
version = "master";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "salman-abedin";
|
||||
repo = "devour";
|
||||
rev = "ceb871c3046ce290c27e2887365b9a19ca38113c";
|
||||
sha256 = "0f2jb8knx7lqy6wmf3rchgq2n2dj496lm8vgcs58rppzrmsk59d5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ xdo ];
|
||||
|
||||
DESTDIR="$(out)";
|
||||
|
||||
fixupPhase = ''
|
||||
wrapProgram $out/bin/devour --prefix PATH ":" ${xdo}/bin ;
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/salman-abedin/devour";
|
||||
description = "Window Manager agnostic swallowing feature for terminal emulators";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user