mirror of
https://github.com/kmein/niveum
synced 2026-03-23 21:21:08 +01:00
Compare commits
40 Commits
grimm
...
717672e86e
| Author | SHA1 | Date | |
|---|---|---|---|
| 717672e86e | |||
| 1cee1c06f7 | |||
| 4d5989aa5b | |||
| 01bdeb05b7 | |||
| 5c422e74e8 | |||
| 6063f4c90b | |||
| 7c4557331f | |||
| 8a7e4386fb | |||
| 61ab528d56 | |||
| 032810109c | |||
| 6b0bb6a806 | |||
| 7ce64d461c | |||
| 51afd41254 | |||
| eb4fa1b9bd | |||
| ac7a4b2aa5 | |||
| 89a4b13b2d | |||
| f5da2dffd8 | |||
| cdf42df7c1 | |||
| 3ccf0cfe9a | |||
| 83632cbd9c | |||
|
|
092879a425 | ||
| c6a45b421b | |||
| b5addef848 | |||
| e2cf761aea | |||
| 868dc8a4aa | |||
| dfd4bb0ca8 | |||
| 3e03688c81 | |||
| 3136002449 | |||
| 4cbd2fee7d | |||
| 565c73bd05 | |||
| e5f933977c | |||
| 736b289643 | |||
| e0e0dd9e34 | |||
| 1e2613b838 | |||
| f41ddb654a | |||
| 41ecca8411 | |||
| a80f4d866a | |||
| f56e9aa37b | |||
| 822b0df4b8 | |||
| c16123dc8d |
19
.bin/calendars.sh
Executable file
19
.bin/calendars.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
directory="$(mktemp -d)"
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$directory"
|
||||
}
|
||||
|
||||
year=2022
|
||||
output=/tmp/$year.pdf
|
||||
|
||||
for month in $(seq 1 12); do
|
||||
printf "\r%d" "$month" 1>&2
|
||||
astrolog -zN Berlin -qm "$month" "$year" -X -K -XA -R Uranus Neptune Pluto -Xr -Xm -Xb -Xo "$(printf "%s/%02d.bmp" "$directory" "$month")" -Xw 1080 720 2>/dev/null
|
||||
done
|
||||
printf "\r"
|
||||
|
||||
convert "$directory/*.bmp" "$output"
|
||||
echo "$output"
|
||||
65
.bin/prospekte.sh
Executable file
65
.bin/prospekte.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
lidl() {
|
||||
echo LIDL
|
||||
curl -sSL 'https://endpoints.lidl-flyer.com/v3/region-overview/lidl/de-DE/0.json' \
|
||||
| jq -r '
|
||||
.categories
|
||||
| map(select(.name == "Filial-Angebote") | .subcategories | map(.flyers))
|
||||
| flatten
|
||||
| flatten
|
||||
| .[]
|
||||
| .pdfUrl
|
||||
'
|
||||
}
|
||||
|
||||
aldi_nord() {
|
||||
echo ALDI nord
|
||||
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-aktuell/GetPDF.ashx'
|
||||
echo 'https://magazine.aldi-nord.de/aldi-nord/aldi-vorschau/GetPDF.ashx'
|
||||
}
|
||||
|
||||
rewe_berlin() {(
|
||||
store_id=662366923
|
||||
publisher_id=1062
|
||||
|
||||
echo REWE
|
||||
curl -sSL 'https://www.bonialserviceswidget.de/de/stores/'$store_id'/brochures?storeId='$store_id'&publisherId='$publisher_id | while read -r brochure_id; do
|
||||
curl -sSL 'https://www.bonialserviceswidget.de/de/v5/brochureDetails/'"$brochure_id"'?publisherId='$publisher_id | jq -r .pdfUrl
|
||||
done
|
||||
)}
|
||||
|
||||
kaufland() {(
|
||||
region_code=8920
|
||||
echo KAUFLAND
|
||||
curl -sSL https://filiale.kaufland.de/prospekte.html | htmlq --attribute href '.flyer a' | grep -Eo 'DE_de_KDZ[^/]*' | sed "s/_3000_/_${region_code}_/" | while read -r flyer_id; do
|
||||
curl -sSL "https://endpoints.leaflets.kaufland.com/v3/$flyer_id/flyer.json?regionCode=$region_code" | jq -r .flyer.pdfUrl
|
||||
done
|
||||
)}
|
||||
|
||||
netto_schwarz() {
|
||||
echo 'NETTO (schwarz)'
|
||||
curl -sSL 'https://squid-api.tjek.com/v2/catalogs?dealer_ids=90f2VL&order_by=created' \
|
||||
| jq -r '.[] | .id' \
|
||||
| while read -r flyer_id; do
|
||||
curl -sSL "https://squid-api.tjek.com/v2/catalogs/$flyer_id/download" \
|
||||
| jq -r .pdf_url
|
||||
done
|
||||
}
|
||||
|
||||
dir="$(mktemp -d)"
|
||||
trap clean EXIT
|
||||
|
||||
clean() {
|
||||
rm -rf "$dir"
|
||||
}
|
||||
|
||||
prospekt_url="$( (
|
||||
lidl
|
||||
aldi_nord
|
||||
rewe_berlin
|
||||
kaufland
|
||||
netto_schwarz
|
||||
) | fzf)"
|
||||
|
||||
curl -sSL "$prospekt_url" -o "$dir/prospekt.pdf"
|
||||
zathura "$dir/prospekt.pdf"
|
||||
16
.bin/screencap.sh
Executable file
16
.bin/screencap.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i sh -p coreutils byzanz xorg.xwininfo gnused
|
||||
|
||||
# shellcheck shell=sh
|
||||
# ref https://gist.github.com/aforemny/0994cb7f06ea30d56c8b9681ff5d2054
|
||||
|
||||
set -eux
|
||||
|
||||
eval "$(xwininfo | \
|
||||
sed -n -e 's/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p' \
|
||||
-e 's/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p' \
|
||||
-e 's/^ \+Width: \+\([0-9]\+\).*/w=\1/p' \
|
||||
-e 's/^ \+Height: \+\([0-9]\+\).*/h=\1/p')"
|
||||
|
||||
trap "pkill -f 'sleep 360d'" INT
|
||||
byzanz-record -e "sleep 360d" -c -x $x -y $y -w $w -h $h "$@"
|
||||
50
.bin/toposort.nix
Normal file
50
.bin/toposort.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
let
|
||||
lib = import <nixpkgs/lib>;
|
||||
in rec {
|
||||
inherit lib;
|
||||
|
||||
input = [
|
||||
{
|
||||
x = ["pool" "zfs"];
|
||||
y = ["mdadm" "raid1"];
|
||||
}
|
||||
{
|
||||
x = ["pool" "zfs"];
|
||||
y = ["disk" "sda"];
|
||||
}
|
||||
{
|
||||
x = ["mdadm" "raid1"];
|
||||
y = ["disk" "sdb"];
|
||||
}
|
||||
{
|
||||
x = ["mdadm" "raid1"];
|
||||
y = ["disk" "sdc"];
|
||||
}
|
||||
];
|
||||
|
||||
outNodes = node: graph:
|
||||
lib.unique
|
||||
(builtins.map (e: e.y)
|
||||
(builtins.filter (v: v.x == node) graph));
|
||||
|
||||
vertices = graph:
|
||||
lib.unique
|
||||
(builtins.map (x: x.y) graph ++ builtins.map (x: x.x) graph);
|
||||
|
||||
deleteVertex = node: graph: (builtins.filter (v: v.x != node && v.y != node) graph);
|
||||
|
||||
findSink = graph:
|
||||
lib.findFirst
|
||||
(v: outNodes v graph == [])
|
||||
(lib.trace graph (builtins.abort "No sink found"))
|
||||
(vertices graph);
|
||||
|
||||
topSort = graph:
|
||||
if graph == []
|
||||
then []
|
||||
else if builtins.length graph == 1
|
||||
then let only = builtins.head graph; in [only.y only.x]
|
||||
else let sink = findSink graph; in [sink] ++ topSort (deleteVertex sink graph);
|
||||
|
||||
output = topSort input;
|
||||
}
|
||||
15
.bin/tuesday-1800
Executable file
15
.bin/tuesday-1800
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
expected_max_results=1024 # the upper bound on the number of restaurants
|
||||
radius=500
|
||||
|
||||
echo '[out:json];node(id:260050809)->.cbase;
|
||||
(
|
||||
way(around.cbase:'$radius')[amenity=restaurant];
|
||||
node(around.cbase:'$radius')[amenity=restaurant];
|
||||
);out;' \
|
||||
| curl -sSL -d @- -X POST http://overpass-api.de/api/interpreter \
|
||||
| jq --argjson random "$(shuf -i 0-$expected_max_results -n 1)" '
|
||||
.elements
|
||||
| length as $length
|
||||
| .[$random % $length]
|
||||
'
|
||||
3
ci.nix
3
ci.nix
@@ -46,6 +46,7 @@
|
||||
"mail/meinhaki"
|
||||
"mail/dslalewa"
|
||||
"mail/posteo"
|
||||
"mega/password"
|
||||
"nextcloud-fysi/password"
|
||||
"nextcloud/password"
|
||||
"openweathermap.key"
|
||||
@@ -56,7 +57,7 @@
|
||||
"spotify/password"
|
||||
];
|
||||
systemSecrets = let
|
||||
basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem"];
|
||||
basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem" "ssh/passphrase"];
|
||||
in
|
||||
{
|
||||
zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic);
|
||||
|
||||
@@ -15,14 +15,6 @@ in {
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map tmpfilesConfig [
|
||||
{
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = "users";
|
||||
mode = "0755";
|
||||
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
|
||||
path = "${config.users.users.me.home}/notes";
|
||||
}
|
||||
{
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
@@ -42,9 +34,9 @@ in {
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
services.gnome-keyring.enable = true;
|
||||
services.gnome-keyring.enable = false;
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
startInBackground = true;
|
||||
};
|
||||
systemd.user.services.nextcloud-client = {
|
||||
@@ -55,6 +47,28 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.nextcloud-syncer = {
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = ["default.target"];
|
||||
startAt = "*:00/10";
|
||||
script = let
|
||||
kieran = {
|
||||
user = "kieran";
|
||||
password = lib.fileContents <secrets/nextcloud/password>;
|
||||
endpoint = "https://cloud.xn--kiern-0qa.de";
|
||||
target = "${config.users.users.me.home}/notes";
|
||||
};
|
||||
in ''
|
||||
mkdir -p ${lib.escapeShellArg kieran.target}
|
||||
${pkgs.nextcloud-client}/bin/nextcloudcmd --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes ${lib.escapeShellArg kieran.target} ${kieran.endpoint}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "book" ''
|
||||
set -efu
|
||||
@@ -62,8 +76,32 @@ in {
|
||||
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/syncthing/library -type f
|
||||
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/Seafile/Books -type f
|
||||
} | ${pkgs.fzf}/bin/fzf)"
|
||||
${pkgs.zathura}/bin/zathura "$book"
|
||||
exec ${pkgs.zathura}/bin/zathura "$book"
|
||||
'')
|
||||
(let
|
||||
kieran = {
|
||||
user = "kieran.meinhardt@gmail.com";
|
||||
password = lib.fileContents <secrets/mega/password>;
|
||||
};
|
||||
megatools = command: "${pkgs.megatools}/bin/megatools ${command} --username ${lib.escapeShellArg kieran.user} --password ${lib.escapeShellArg kieran.password}";
|
||||
in
|
||||
pkgs.writers.writeDashBin "book-mega" ''
|
||||
set -efu
|
||||
selection="$(${megatools "ls"} | ${pkgs.fzf}/bin/fzf)"
|
||||
test -n "$selection" || exit 1
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
(
|
||||
cd "$tmpdir"
|
||||
${megatools "get"} "$selection"
|
||||
exec ${pkgs.zathura}/bin/zathura "$(basename "$selection")"
|
||||
)
|
||||
'')
|
||||
];
|
||||
|
||||
fileSystems."/media/moodle" = {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
}: let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import <niveum/lib>) localAddresses kieran;
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
in {
|
||||
imports = [
|
||||
<home-manager/nixos>
|
||||
@@ -38,14 +39,6 @@ in {
|
||||
});
|
||||
};
|
||||
};
|
||||
overlays = [
|
||||
(self: super: {
|
||||
scripts = import <niveum/packages/scripts> {
|
||||
pkgs = super;
|
||||
lib = super.lib;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
@@ -121,7 +114,7 @@ in {
|
||||
cd "$(mktemp -d)"
|
||||
pwd
|
||||
'';
|
||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
"ß" = "${pkgs.utillinux}/bin/setsid";
|
||||
cat = "${pkgs.bat}/bin/bat --style=plain";
|
||||
|
||||
@@ -1,4 +1,52 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
zip-font = name: arguments: let
|
||||
directory = pkgs.fetchzip arguments;
|
||||
in
|
||||
pkgs.runCommand name {} ''
|
||||
mkdir -p $out/share/fonts/{truetype,opentype,woff}
|
||||
${pkgs.findutils}/bin/find ${directory} -name '*.ttf' -exec install '{}' $out/share/fonts/truetype \;
|
||||
${pkgs.findutils}/bin/find ${directory} -name '*.otf' -exec install '{}' $out/share/fonts/opentype \;
|
||||
${pkgs.findutils}/bin/find ${directory} -name '*.woff' -exec install '{}' $out/share/fonts/woff \;
|
||||
'';
|
||||
simple-ttf = name: arguments: let
|
||||
file = pkgs.fetchurl arguments;
|
||||
in
|
||||
pkgs.runCommand name {} ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
install ${file} $out/share/fonts/truetype
|
||||
'';
|
||||
|
||||
egyptianHiero = zip-font "EgyptianHiero" {
|
||||
url = "https://github.com/MKilani/Djehuty/archive/master.zip";
|
||||
sha256 = "0xaq16ysvxrkcn3264wkmm2ln0hpijpk4iq1n5i7d9gqhjhsav1x";
|
||||
};
|
||||
antinoou = zip-font "Antinoou" {
|
||||
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
|
||||
sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw";
|
||||
stripRoot = false;
|
||||
};
|
||||
newGardiner = zip-font "NewGardiner" {
|
||||
url = "https://mjn.host.cs.st-andrews.ac.uk/egyptian/fonts/NewGardiner.zip";
|
||||
sha256 = "1jd0qa6shh9pqqyig2w43m9l9rv1i50l73jzkhb6g6mqxbhb1mip";
|
||||
stripRoot = false;
|
||||
};
|
||||
junicode2 = zip-font "JunicodeTwo" {
|
||||
url = "https://github.com/psb1558/Junicode-font/archive/48bf476db278c844c67542b04d1e0e4c71f139d2.zip";
|
||||
sha256 = "1ryicc155vkvgv3315ddliigwa01afwyb4c4f6pnqcns03af001i";
|
||||
};
|
||||
newAthenaUnicode = zip-font "NewAthenaUnicode" {
|
||||
url = "https://classicalstudies.org/sites/default/files/userfiles/files/NAU5_005.zip";
|
||||
sha256 = "1g7qk9gl4nq2dz41bvck1nzilhin44j8691cxax3dlp77bbn9bxr";
|
||||
};
|
||||
jsesh = simple-ttf "JSesh" {
|
||||
url = "http://files.qenherkhopeshef.org/jsesh/JSeshFont.ttf";
|
||||
sha256 = "1203jrk2xzvgckcc5hx88kja1i3h8gm1wiyla5j6gspc0hbv56ry";
|
||||
};
|
||||
egyptianText = simple-ttf "EgyptianText-1.0beta" {
|
||||
url = "http://c.krebsco.de/EgyptianText-v1.0-beta.ttf";
|
||||
sha256 = "0cfjbk7xxnxhlp6v922psm5j1xzrv6wfk226ji2wz2yfrnkbcbsv";
|
||||
};
|
||||
in {
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
fontDir.enable = true;
|
||||
@@ -7,13 +55,22 @@
|
||||
alegreya-sans
|
||||
amiri
|
||||
annapurna-sil
|
||||
antinoou
|
||||
cantarell-fonts
|
||||
cardo
|
||||
charis-sil
|
||||
doulos-sil
|
||||
newAthenaUnicode
|
||||
corefonts
|
||||
crimson
|
||||
eb-garamond
|
||||
jsesh
|
||||
egyptianHiero
|
||||
egyptianText
|
||||
font-awesome_6
|
||||
etBook
|
||||
newGardiner
|
||||
junicode2
|
||||
ezra-sil
|
||||
fira
|
||||
font-awesome
|
||||
@@ -44,11 +101,11 @@
|
||||
vollkorn
|
||||
zilla-slab
|
||||
]; # google-fonts league-of-moveable-type
|
||||
fontconfig.defaultFonts = {
|
||||
monospace = ["Noto Sans Mono"];
|
||||
fontconfig.defaultFonts = rec {
|
||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
|
||||
emoji = ["Noto Color Emoji" "Noto Emoji"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
...
|
||||
}: let
|
||||
inherit (import <niveum/lib>) defaultApplications colours;
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
klem = import <niveum/packages/scripts/klem.nix> {
|
||||
inherit pkgs lib;
|
||||
config.scripts = {
|
||||
@@ -26,13 +27,13 @@
|
||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||
'';
|
||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||
${pkgs.scripts.ipa}/bin/ipa
|
||||
${scripts.ipa}/bin/ipa
|
||||
'';
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${pkgs.scripts.betacode}/bin/betacode
|
||||
${scripts.betacode}/bin/betacode
|
||||
'';
|
||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
||||
${pkgs.scripts.devanagari}/bin/devanagari
|
||||
${scripts.devanagari}/bin/devanagari
|
||||
'';
|
||||
"avesta" = pkgs.writeScript "avesta" (builtins.readFile <niveum/packages/scripts/avesta.sed>);
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
@@ -155,7 +156,7 @@ in {
|
||||
names = ["Monospace" "Font Awesome 6 Free"];
|
||||
size = 8.0;
|
||||
};
|
||||
mode = "hide"; # "dock"
|
||||
mode = "dock"; # "hide";
|
||||
position = "bottom";
|
||||
colors = rec {
|
||||
background = colours.background;
|
||||
@@ -227,9 +228,9 @@ in {
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
"${modifier}+0" = "exec ${pkgs.scripts.menu-calc}/bin/=";
|
||||
"${modifier}+0" = "exec ${scripts.menu-calc}/bin/=";
|
||||
|
||||
"${modifier}+Shift+w" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
||||
"${modifier}+Shift+w" = "exec ${scripts.k-lock}/bin/k-lock";
|
||||
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec ${pkgs.rofi}/bin/rofi -modi run,window,ssh,filebrowser -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${
|
||||
pkgs.writers.writeDash "notemenu" ''
|
||||
@@ -242,7 +243,7 @@ in {
|
||||
note_file=$({
|
||||
echo diary/$(date -I).md
|
||||
echo diary/$(date -I -d yesterday).md
|
||||
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2
|
||||
find . ! -name '.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
@@ -251,10 +252,10 @@ in {
|
||||
''
|
||||
}";
|
||||
"${modifier}+p" = "exec --no-startup-id ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+u" = "exec ${scripts.unicodmenu}/bin/unicodmenu";
|
||||
|
||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
|
||||
"${modifier}+F7" = "exec ${scripts.showkeys-toggle}/bin/showkeys-toggle";
|
||||
"${modifier}+F8" = "exec switch-theme toggle";
|
||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
@@ -270,9 +271,9 @@ in {
|
||||
"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";
|
||||
"XF86ScreenSaver" = "exec ${scripts.k-lock}/bin/k-lock";
|
||||
|
||||
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
|
||||
"XF86Display" = "exec ${scripts.dmenurandr}/bin/dmenurandr";
|
||||
|
||||
# key names detected with xorg.xev:
|
||||
# XF86WakeUp (fn twice)
|
||||
|
||||
@@ -16,7 +16,22 @@
|
||||
password = lib.fileContents <secrets/nextcloud-fysi/password>;
|
||||
};
|
||||
in {
|
||||
environment.systemPackages = [pkgs.khal pkgs.vdirsyncer pkgs.khard pkgs.todoman];
|
||||
environment.systemPackages = [
|
||||
pkgs.khal
|
||||
pkgs.vdirsyncer
|
||||
pkgs.khard
|
||||
pkgs.todoman
|
||||
(pkgs.writers.writeDashBin "todo-procrastinate" ''
|
||||
[ $# -eq 1 ] || {
|
||||
echo "Usage: $0 TODO_ID" >&2
|
||||
exit 1
|
||||
}
|
||||
todo_id=$1
|
||||
new_timestamp=$(${pkgs.todoman}/bin/todo --porcelain show "$todo_id" | ${pkgs.jq}/bin/jq '.due + 24 * 60 * 60')
|
||||
new_date=$(${pkgs.coreutils}/bin/date +"%Y-%m-%d %H:%M" -d "@$new_timestamp")
|
||||
${pkgs.todoman}/bin/todo edit "$todo_id" --due "$new_date"
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.user.services.vdirsyncer = {
|
||||
enable = true;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
|
||||
@@ -6,11 +6,8 @@
|
||||
mainMailbox = "posteo";
|
||||
|
||||
accounts = import <niveum/lib/email.nix> {inherit lib mainMailbox;};
|
||||
in {
|
||||
environment.systemPackages = [pkgs.neomutt];
|
||||
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←";
|
||||
|
||||
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = let
|
||||
neomuttConfig = emailAccounts: let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
@@ -101,7 +98,7 @@ in {
|
||||
folder-hook ${account.user}@${account.imap} 'set smtp_url="${account.smtpSettings "${account.user}@${account.smtp}"}" from="${account.address}" record="${imapRoot}/${account.folders.sent}" postponed="${imapRoot}/${account.folders.drafts}" trash="${imapRoot}/${account.folders.trash}"'
|
||||
named-mailboxes "${name}←" "${imapRoot}" "${name}→" "${imapRoot}/${account.folders.sent}"
|
||||
'')
|
||||
accounts)
|
||||
emailAccounts)
|
||||
}
|
||||
''
|
||||
}
|
||||
@@ -161,4 +158,15 @@ in {
|
||||
''
|
||||
}
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [pkgs.neomutt];
|
||||
environment.shellAliases =
|
||||
lib.mapAttrs' (accountName: account:
|
||||
lib.nameValuePair
|
||||
"mua-${accountName}"
|
||||
"${pkgs.neomutt}/bin/neomutt -F ${pkgs.writeText "neomuttrc-${accountName}" (neomuttConfig {"${accountName}" = accounts.${accountName};})}")
|
||||
accounts
|
||||
// {mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←";};
|
||||
|
||||
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = neomuttConfig accounts;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,42 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
|
||||
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
||||
|
||||
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
|
||||
|
||||
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
||||
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
||||
linkhandler = pkgs.writers.writeDash "linkhandler" ''
|
||||
# Feed script a url or file location.
|
||||
# If an image, it will view in sxiv,
|
||||
# if a video or gif, it will view in mpv
|
||||
# if a music file or pdf, it will download,
|
||||
# otherwise it opens link in browser.
|
||||
|
||||
# If no url given. Opens browser. For using script as $BROWSER.
|
||||
[ -z "$1" ] && { "$BROWSER"; exit; }
|
||||
|
||||
case "$1" in
|
||||
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
|
||||
setsid -f ${pkgs.mpv}/bin/mpv -quiet "$1" >/dev/null 2>&1 ;;
|
||||
*png|*jpg|*jpe|*jpeg|*gif)
|
||||
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;
|
||||
*mp3|*flac|*opus|*mp3?source*)
|
||||
setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;;
|
||||
*)
|
||||
if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1"
|
||||
else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
newsboat-config = pkgs.writeText "config" ''
|
||||
auto-reload no
|
||||
reload-threads 8
|
||||
prepopulate-query-feeds yes
|
||||
|
||||
# dont keep a search history
|
||||
@@ -21,12 +46,12 @@
|
||||
|
||||
text-width 85
|
||||
|
||||
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
|
||||
browser ${linkhandler-bin}
|
||||
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler} {}'"
|
||||
browser ${linkhandler}
|
||||
macro , open-in-browser
|
||||
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler-bin}
|
||||
macro c set browser "${pkgs.xsel}/bin/xsel -b <<<" ; open-in-browser ; set browser ${linkhandler}
|
||||
macro v set browser "${pkgs.utillinux}/bin/setsid -f ${pkgs.mpv}/bin/mpv" ; open-in-browser ; set browser ${linkhandler}
|
||||
macro y set browser "${youtube-download}" ; open-in-browser ; set browser ${linkhandler}
|
||||
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
menstruation = pkgs.callPackage <menstruation-backend> {};
|
||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
||||
|
||||
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
|
||||
|
||||
zoteroStyle = {
|
||||
name,
|
||||
sha256,
|
||||
@@ -94,7 +96,7 @@ in {
|
||||
file # determine file type
|
||||
dos2unix
|
||||
genpass # generate passwords
|
||||
ncdu # ncurses disk usage
|
||||
gdu # ncurses disk usage (ncdu is broken)
|
||||
rmlint # remove duplicate files
|
||||
python3Packages.jsonschema # json validation
|
||||
jq # json toolkit
|
||||
|
||||
@@ -8,6 +8,6 @@ in {
|
||||
home-manager.users.me.programs.rofi = {
|
||||
enable = true;
|
||||
font = "Monospace 10";
|
||||
theme = "${pkgs.rofi}/share/rofi/themes/Arc-Dark.rasi";
|
||||
theme = "${pkgs.rofi}/share/rofi/themes/Arc.rasi";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
inherit (import <niveum/lib>) sshPort kieran;
|
||||
externalNetwork = import <niveum/lib/external-network.nix>;
|
||||
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
||||
ssh-passphease = lib.strings.fileContents <system-secrets/ssh/passphrase>;
|
||||
ssh-passphrase = lib.strings.fileContents <system-secrets/ssh/passphrase>;
|
||||
in {
|
||||
services.xserver.displayManager.sessionCommands = toString (pkgs.writeScript "ssh-add" ''
|
||||
#!${pkgs.expect}/bin/expect -f
|
||||
@@ -24,7 +24,7 @@ in {
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
matchBlocks = rec {
|
||||
"github.com" = {
|
||||
hostname = "ssh.github.com";
|
||||
port = 443;
|
||||
@@ -72,6 +72,7 @@ in {
|
||||
user = "root";
|
||||
identityFile = sshIdentity "fysiweb";
|
||||
};
|
||||
${fysi-dev1.hostname} = fysi-dev1;
|
||||
"fysi-shared0" = {
|
||||
hostname = "49.12.205.235";
|
||||
user = "root";
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
'';
|
||||
in {
|
||||
niveum.telegramBots.transits = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
time = "*:0/1";
|
||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chatIds = ["-1001796440545"];
|
||||
@@ -52,7 +52,7 @@ in {
|
||||
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
|
||||
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
|
||||
{
|
||||
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
||||
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node" -A 2
|
||||
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
|
||||
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
|
||||
'');
|
||||
|
||||
44
flake.lock
generated
44
flake.lock
generated
@@ -23,11 +23,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1661573386,
|
||||
"narHash": "sha256-pBEg8iY00Af/SAtU2dlmOAv+2x7kScaGlFRDjNoVJO8=",
|
||||
"lastModified": 1663932797,
|
||||
"narHash": "sha256-IH8ZBW99W2k7wKLS+Sat9HiKX1TPZjFTnsPizK5crok=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d89bdff445eadff03fe414e9c30486bc8166b72b",
|
||||
"rev": "de3758e31a3a1bc79d569f5deb5dac39791bf9b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -110,11 +110,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1661520432,
|
||||
"narHash": "sha256-9z+WDeXiu3hobvSsL0SbHDx4s+kFmm8eussySuX4zCM=",
|
||||
"lastModified": 1663939948,
|
||||
"narHash": "sha256-tZROWStjk7aXbM6XTbspRb9dSk/4lw7EFBOrt2A09Ag=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f11e12ac6af528c1ba12426ce83cee26f21ceafd",
|
||||
"rev": "7e27b838cd7ac90fed03d0d5a8487848c4b0b6d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -126,11 +126,11 @@
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1660305968,
|
||||
"narHash": "sha256-r0X1pZCSEA6mzt5OuTA7nHuLmvnbkwgpFAh1iLIx4GU=",
|
||||
"lastModified": 1663850217,
|
||||
"narHash": "sha256-tp9nXo1/IdN/xN9m06ryy0QUAEfoN6K56ObM/1QTAjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d",
|
||||
"rev": "ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -159,11 +159,11 @@
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1660680907,
|
||||
"narHash": "sha256-D6XkykgU1BiDAnnFG9NwSqBRKCZAHK+2+Ri2/m9rzo8=",
|
||||
"lastModified": 1664019034,
|
||||
"narHash": "sha256-do31QxpQtmuWclx9yhM6UslVO7XdXofLbXZ4nr3fLJ0=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "c4d6b07be29b3b9267027ed25792a2cb350459d5",
|
||||
"rev": "8d9b86a0ce503588bb34ae8676fdbcb0e4014119",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -211,11 +211,11 @@
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661246925,
|
||||
"narHash": "sha256-hGNCF4m3SuVogqoipmJzNIKoh03S/SMnO5oMHgfHWjA=",
|
||||
"lastModified": 1663587256,
|
||||
"narHash": "sha256-tOwUL8UFP8H8FosYVp8WiPr0nIPhcbN79nNJJgD0cUU=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "d1fa957ed5bf60767c83c96135f9142f6c96ea50",
|
||||
"revCount": 10749,
|
||||
"rev": "55957c6d6adb51d2079c117c1e7309c60ee0fe0f",
|
||||
"revCount": 10779,
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
},
|
||||
@@ -243,11 +243,11 @@
|
||||
"tinc-graph": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1653080212,
|
||||
"narHash": "sha256-BcfppAuVNp0hMcrMG/ZxE4juSrdQbJSUIA0eHS1/Wxo=",
|
||||
"lastModified": 1663740920,
|
||||
"narHash": "sha256-F04wF/6KkzZZ1d8r3xOqkXg1IlBl32LaUBnBYjWUA1A=",
|
||||
"owner": "kmein",
|
||||
"repo": "tinc-graph",
|
||||
"rev": "ea0ef2e5542684d1d8e34a626cb9295dec33e70d",
|
||||
"rev": "78e7ed7acae6a3a29f537fdbf5db993a63b46fff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -290,11 +290,11 @@
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -6,7 +6,7 @@ let
|
||||
ambient = "🧘 Ambient";
|
||||
american = "🇺🇸 USA";
|
||||
amro = "👦 Amro";
|
||||
arabic = "🇸🇦 عربيic";
|
||||
arabic = "🇱🇧 عربي";
|
||||
balkan = "🇧🇦 Balkan";
|
||||
berlin = "🐻 Berlin";
|
||||
brazilian = "🇧🇷 Brasil";
|
||||
@@ -14,6 +14,7 @@ let
|
||||
chinese = "🇨🇳 中国";
|
||||
classical = "🎻 Classical";
|
||||
discover = "😲 Discover";
|
||||
danish = "🇩🇰 Dansk";
|
||||
dnb = "🥁 DnB";
|
||||
dubstep = "🎆 Dubstep";
|
||||
french = "🇫🇷 France";
|
||||
@@ -30,6 +31,7 @@ let
|
||||
metal = "🤘 Metal";
|
||||
party = "🪩 Party";
|
||||
pop = "🎙 Pop";
|
||||
radiorecord = "⏺ Record";
|
||||
rap = "💸 Rap";
|
||||
rock = "🎸 Rock";
|
||||
russian = "🇷🇺 Россия";
|
||||
@@ -70,6 +72,9 @@ let
|
||||
royal-name = name: "${name} | RoyalRadio";
|
||||
royal = name: "http://193.33.170.218:8000/${name}";
|
||||
|
||||
dr-name = name: "${name} | Danmarks Radio";
|
||||
dr = name: let quality = 320; in "https://drliveradio.akamaized.net/hls/live/2022411-b/${name}/playlist-${toString quality}000.m3u8";
|
||||
|
||||
bhaktiworld-name = name: "${name} | Bhaktiworld";
|
||||
bhaktiworld = name: "http://${name}.out.airtime.pro:8000/${name}_a";
|
||||
bhaktiworld-logo = "http://www.bhaktiworld.com/Bhakti-world-logo.png";
|
||||
@@ -164,7 +169,7 @@ in
|
||||
]
|
||||
++
|
||||
# generated via: curl https://radiorecord.ru/api/stations | jq '.result.stations | sort_by(.sort) | map({station:.title,desc:.tooltip,logo:.icon_fill_colored,stream:.stream_320})' > radiorecord.json
|
||||
importJSON ./radiorecord.json
|
||||
map (x: x // {tags = [tags.radiorecord];}) (importJSON ./radiorecord.json)
|
||||
++ [
|
||||
{
|
||||
desc = "Your favorite dance tunes from the start of the decade. Familiar hits and overlooked classics in abundance.";
|
||||
@@ -1781,6 +1786,41 @@ in
|
||||
stream = "http://radio.hostchefs.net:8046/stream";
|
||||
tags = [tags.greek];
|
||||
}
|
||||
{
|
||||
station = dr-name "P4 København";
|
||||
stream = dr "p4kobenhavn";
|
||||
tags = [tags.top40 tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P1";
|
||||
stream = dr "p1";
|
||||
tags = [tags.top40 tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P2";
|
||||
stream = dr "p2";
|
||||
tags = [tags.classical tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P3";
|
||||
stream = dr "p3";
|
||||
tags = [tags.top40 tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P5 København";
|
||||
stream = dr "p5kobenhavn";
|
||||
tags = [tags.top40 tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P6 Beat";
|
||||
stream = dr "p6beat";
|
||||
tags = [tags.top40 tags.danish];
|
||||
}
|
||||
{
|
||||
station = dr-name "P8 Jazz";
|
||||
stream = dr "p8jazz";
|
||||
tags = [tags.jazz tags.danish];
|
||||
}
|
||||
]
|
||||
/*
|
||||
(caster-fm "TODO" "noasrv" 10182) # https://github.com/cccruzr/albumsyoumusthear/blob/7e00baf575e4d357cd275d54d1aeb717321141a8/HLS/IBERO_90_1.m3u
|
||||
|
||||
7
packages/jsesh.nix
Normal file
7
packages/jsesh.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.writers.writeDashBin "jsesh" ''
|
||||
${pkgs.jre}/bin/java -jar ${pkgs.fetchzip {
|
||||
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
|
||||
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
|
||||
}}/lib/jseshAppli-7.5.5.jar
|
||||
''
|
||||
@@ -278,12 +278,6 @@ in
|
||||
name = "nix-git";
|
||||
};
|
||||
|
||||
linkhandler = wrapScript {
|
||||
packages = [pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts];
|
||||
script = "${voidrice}/.local/bin/linkhandler";
|
||||
name = "linkhandler";
|
||||
};
|
||||
|
||||
mansplain = wrapScript {
|
||||
packages = [pkgs.man pkgs.zathura pkgs.dmenu pkgs.gnused];
|
||||
script = ./mansplain.sh;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
with open("${
|
||||
fetchurl {
|
||||
url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt";
|
||||
sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs=";
|
||||
sha256 = "0wva6ygnh3wrzpzy0kcbc32hz1ydx3k2pqc5xkqrfw83cpnrlvl0";
|
||||
}
|
||||
}", "r") as unicode_data:
|
||||
reader = csv.reader(unicode_data, delimiter=";")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
# <niveum/configs/monitoring.nix>
|
||||
<niveum/configs/monitoring.nix>
|
||||
<niveum/configs/nix.nix>
|
||||
<niveum/configs/save-space.nix>
|
||||
<niveum/configs/spacetime.nix>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
"/mnt/sd-card" = {
|
||||
device = "/dev/disk/by-id/mmc-SD32G_0xda0aa352-part1";
|
||||
fsType = "vfat";
|
||||
device = "/dev/disk/by-id/mmc-5E4S5_0xc5155d05-part1";
|
||||
fsType = "ext4";
|
||||
options = ["nofail"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,6 @@ in {
|
||||
./monitoring
|
||||
./moodle-dl-borsfaye.nix
|
||||
./names.nix
|
||||
./grimm.nix
|
||||
./nextcloud.nix
|
||||
./radio-news.nix
|
||||
./radio.nix
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{pkgs, ...}: let
|
||||
port = 9610;
|
||||
web-socket-sink-src = "${<scripts>}/grimm-scroller";
|
||||
web-socket-sink = pkgs.callPackage web-socket-sink-src {};
|
||||
lemmata = "${web-socket-sink-src}/dwb-compact.json";
|
||||
in {
|
||||
systemd.services.grimm-ws = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
script = "${web-socket-sink}/bin/web-socket-sink --host 0.0.0.0 --port ${toString port} < ${lemmata}";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."grimm.kmein.de" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
locations = {
|
||||
"/".root = pkgs.linkFarm "grimm" [
|
||||
{
|
||||
name = "index.html";
|
||||
path = "${web-socket-sink-src}/wclient.html";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
}
|
||||
@@ -258,6 +258,16 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "ful";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"ful.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
services.prometheus.exporters.blackbox = {
|
||||
|
||||
@@ -20,7 +20,7 @@ in {
|
||||
];
|
||||
|
||||
services.moodle-dl = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
startAt = "hourly";
|
||||
package = moodle-dl-package;
|
||||
notifyOnly = true;
|
||||
|
||||
@@ -104,6 +104,9 @@ in {
|
||||
addresses = "news.r";
|
||||
autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"];
|
||||
command = "/oper aids balls";
|
||||
sasl_mechanism = "plain";
|
||||
sasl_username = nick;
|
||||
sasl_password = nick + nick;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -79,6 +79,9 @@ in {
|
||||
113275 # ALEW
|
||||
112783 # Akzent und Silbenstruktur
|
||||
113493 # Papyrologie
|
||||
|
||||
# WS 2022
|
||||
115414 # Nonnos
|
||||
];
|
||||
download_submissions = true;
|
||||
download_descriptions = true;
|
||||
|
||||
Reference in New Issue
Block a user