1
0
mirror of https://github.com/kmein/niveum synced 2026-03-20 20:01:08 +01:00

13 Commits

18 changed files with 215 additions and 492 deletions

View File

@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.zeroad ];
networking.firewall = {
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
}

View File

@@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
darwin = lib.strings.hasSuffix "-darwin" pkgs.system; darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
in { in {
environment.systemPackages = environment.systemPackages =
[ [

View File

@@ -17,11 +17,15 @@ in {
./hesychius.nix ./hesychius.nix
./smyth.nix ./smyth.nix
./nachtischsatan.nix ./nachtischsatan.nix
./tlg-wotd.nix # ./tlg-wotd.nix TODO reenable
./celan.nix ./celan.nix
./nietzsche.nix ./nietzsche.nix
]; ];
age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
};
systemd.tmpfiles.rules = map (path: systemd.tmpfiles.rules = map (path:
tmpfilesConfig { tmpfilesConfig {
type = "d"; type = "d";

View File

@@ -3,11 +3,14 @@
lib, lib,
config, config,
niveumPackages, niveumPackages,
unstablePackages,
... ...
}: let }: let
mastodonEndpoint = "https://social.krebsco.de"; mastodonEndpoint = "https://social.krebsco.de";
in { in {
systemd.services.bot-tlg-wotd = { systemd.services.bot-tlg-wotd = {
# TODO reenable
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
enable = true; enable = true;
wants = ["network-online.target"]; wants = ["network-online.target"];
startAt = "9:30"; startAt = "9:30";
@@ -42,9 +45,8 @@ in {
#ancientgreek #classics #wotd #wordoftheday #ancientgreek #classics #wotd #wordoftheday
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" { transliteration=$(${pkgs.writers.writePython3 "translit.py" {
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged libraries = py: [ py.cltk ];
libraries = [ pkgs.python3Packages.cltk ];
} '' } ''
import sys import sys
from cltk.phonology.grc.transcription import Transcriber from cltk.phonology.grc.transcription import Transcriber
@@ -149,7 +151,6 @@ in {
}; };
age.secrets = { age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age; mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
}; };

13
configs/gaming.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.zeroad
pkgs.mari0
pkgs.luanti # fka minetest
];
networking.firewall = {
# for 0ad multiplayer
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
}

114
flake.lock generated
View File

@@ -813,26 +813,23 @@
"type": "github" "type": "github"
} }
}, },
"nix-formatter-pack_2": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nix-on-droid",
"nixpkgs" "nixpkgs"
], ]
"nmd": "nmd_3",
"nmt": "nmt_2"
}, },
"locked": { "locked": {
"lastModified": 1666720474, "lastModified": 1765267181,
"narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=", "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
"owner": "Gerschtli", "owner": "nix-community",
"repo": "nix-formatter-pack", "repo": "nix-index-database",
"rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5", "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Gerschtli", "owner": "nix-community",
"repo": "nix-formatter-pack", "repo": "nix-index-database",
"type": "github" "type": "github"
} }
}, },
@@ -867,33 +864,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-on-droid_2": {
"inputs": {
"home-manager": [
"home-manager"
],
"nix-formatter-pack": "nix-formatter-pack_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap_2",
"nmd": "nmd_4"
},
"locked": {
"lastModified": 1688144254,
"narHash": "sha256-8KL1l/7eP2Zm1aJjdVaSOk0W5kTnJo9kcgW03gqWuiI=",
"owner": "t184256",
"repo": "nix-on-droid",
"rev": "2301e01d48c90b60751005317de7a84a51a87eb6",
"type": "github"
},
"original": {
"owner": "t184256",
"ref": "release-23.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nix-writers": { "nix-writers": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -982,22 +952,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-for-bootstrap_2": {
"locked": {
"lastModified": 1686921029,
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
}
},
"nixpkgs-old": { "nixpkgs-old": {
"locked": { "locked": {
"lastModified": 1682600000, "lastModified": 1682600000,
@@ -1280,38 +1234,6 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nmd_3": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_4": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmt": { "nmt": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1328,22 +1250,6 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nmt_2": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1693680361, "lastModified": 1693680361,
@@ -1491,7 +1397,7 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"menstruation-backend": "menstruation-backend_2", "menstruation-backend": "menstruation-backend_2",
"menstruation-telegram": "menstruation-telegram_2", "menstruation-telegram": "menstruation-telegram_2",
"nix-on-droid": "nix-on-droid_2", "nix-index-database": "nix-index-database",
"nixinate": "nixinate_2", "nixinate": "nixinate_2",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_7",
"nixpkgs-old": "nixpkgs-old_2", "nixpkgs-old": "nixpkgs-old_2",

View File

@@ -130,7 +130,6 @@
# TODO remove flake-utils dependency from my own repos # TODO remove flake-utils dependency from my own repos
nixosModules = { nixosModules = {
htgen = import modules/htgen.nix;
moodle-dl = import modules/moodle-dl.nix; moodle-dl = import modules/moodle-dl.nix;
networkmanager-declarative = import modules/networkmanager-declarative.nix; networkmanager-declarative = import modules/networkmanager-declarative.nix;
passport = import modules/passport.nix; passport = import modules/passport.nix;
@@ -170,7 +169,6 @@
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
inputs.self.nixosModules.panoptikon inputs.self.nixosModules.panoptikon
inputs.self.nixosModules.go-webring inputs.self.nixosModules.go-webring
inputs.self.nixosModules.htgen
inputs.stockholm.nixosModules.reaktor2 inputs.stockholm.nixosModules.reaktor2
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
nur.modules.nixos.default nur.modules.nixos.default
@@ -212,7 +210,6 @@
modules = [ modules = [
systems/makanek/configuration.nix systems/makanek/configuration.nix
inputs.self.nixosModules.telegram-bot inputs.self.nixosModules.telegram-bot
inputs.self.nixosModules.htgen
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
@@ -319,7 +316,6 @@
# krebs # krebs
brainmelter = pkgs.callPackage packages/brainmelter.nix {}; brainmelter = pkgs.callPackage packages/brainmelter.nix {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {}; cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
htgen = pkgs.callPackage packages/htgen.nix {};
hc = pkgs.callPackage packages/hc.nix {}; hc = pkgs.callPackage packages/hc.nix {};
kpaste = pkgs.callPackage packages/kpaste.nix {}; kpaste = pkgs.callPackage packages/kpaste.nix {};
pls = pkgs.callPackage packages/pls.nix {}; pls = pkgs.callPackage packages/pls.nix {};

View File

@@ -85,9 +85,6 @@ let
big-fm-name = name: "${name} | bigFM"; big-fm-name = name: "${name} | bigFM";
big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac"; big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac";
rautemusik-name = name: "${name} | rm.fm";
rautemusik = name: "http://${name}-high.rautemusik.fm/";
rte-name = name: "RTÉ ${name}"; rte-name = name: "RTÉ ${name}";
rte = name: "https://www.rte.ie/manifests/${name}.m3u8"; rte = name: "https://www.rte.ie/manifests/${name}.m3u8";
@@ -1207,198 +1204,6 @@ in
logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg"; logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg";
tags = [tags.schlager]; tags = [tags.schlager];
} }
{
station = rautemusik-name "Volksmusik";
desc = "Volksmusik, Blasmusik, Schlager";
stream = rautemusik "volksmusik";
tags = [tags.schlager];
}
{
station = rautemusik-name "Study";
stream = rautemusik "study";
desc = "Lo-Fi, Chillout, Easy Listening";
tags = [tags.lofi tags.chill];
}
{
station = rautemusik-name "TechHouse";
stream = rautemusik "techhouse";
desc = "Techhouse, Deephouse, Techno, Minimal";
tags = [tags.party];
}
{
station = rautemusik-name "Goldies";
stream = rautemusik "goldies";
desc = "Oldies, 60s, 70s, 80s";
tags = [tags.vintage];
}
{
station = rautemusik-name "90s";
stream = rautemusik "90s";
desc = "90s, Eurodance, Pop, HipHop";
tags = [tags.vintage];
}
{
station = rautemusik-name "Schlager";
stream = rautemusik "schlager";
desc = "Schlager, Discofox, Deutsch, Pop";
tags = [tags.schlager];
}
{
station = rautemusik-name "Country";
stream = rautemusik "country";
desc = "Country, Western, Americana";
tags = [tags.trad tags.american];
}
{
station = rautemusik-name "Sex";
stream = rautemusik "sex";
desc = "RnB, Pop, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "LoveHits";
stream = rautemusik "lovehits";
desc = "Lovesongs, Balladen, RnB, Pop";
tags = [tags.pop];
}
{
station = rautemusik-name "Klassik";
stream = rautemusik "klassik";
desc = "Symphonie, Orchester, Klassik";
tags = [tags.classical];
}
{
station = rautemusik-name "Traurig";
stream = rautemusik "traurig";
desc = "Balladen, Pop, Easy Listening";
tags = [tags.pop];
}
{
station = rautemusik-name "Happy";
stream = rautemusik "happy";
desc = "Pop, Dance, Charts";
tags = [tags.pop];
}
{
station = rautemusik-name "Solo Piano";
stream = rautemusik "solopiano";
desc = "Klavier, Instrumental, Easy Listening";
tags = [tags.classical];
}
{
station = rautemusik-name "HappyHardcore";
stream = rautemusik "happyhardcore";
desc = "UK Core, Happy Hardcore, Dance";
tags = [tags.party];
}
{
station = rautemusik-name "HardeR";
stream = rautemusik "harder";
desc = "Hardstyle, Hardcore, Jumpstyle";
tags = [tags.party];
}
{
station = rautemusik-name "BigCityBeats";
stream = rautemusik "bigcitybeats";
desc = "EDM, Dance, House, Electro, Star DJs";
tags = [tags.pop tags.party];
}
{
station = rautemusik-name "Lounge";
stream = rautemusik "lounge";
desc = "Ambient, Jazz, Chillout, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "Oriental";
stream = rautemusik "oriental";
desc = "Arabisch, Oriental, HipHop";
tags = [tags.arabic];
}
{
station = rautemusik-name "Salsa";
stream = rautemusik "salsa";
desc = "Salsa, Latina, Tropical";
tags = [tags.groovy];
}
{
station = rautemusik-name "Christmas";
stream = rautemusik "christmas";
desc = "Weihnachtslieder, Balladen, Schlager";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Chor";
stream = rautemusik "christmas-chor";
desc = "Chor, Weihnachtslieder, Gesang";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Schlager";
stream = rautemusik "christmas-schlager";
desc = "Schlager, Weihnachtslieder";
tags = [tags.xmas tags.schlager];
}
{
station = rautemusik-name "Weihnachten.FM";
stream = rautemusik "weihnachten";
desc = "Weihnachtslieder, Pop";
tags = [tags.xmas];
}
{
station = rautemusik-name "Top40";
stream = rautemusik "top40";
desc = "Charts, Top40, Dance, Hiphop";
tags = [tags.top40];
}
{
station = rautemusik-name "Rock";
desc = "Rock, Alternative, Punk";
stream = rautemusik "rock";
tags = [tags.rock];
}
{
station = rautemusik-name "PartyHits";
desc = "Karneval, Mallorca, Après Ski, Schlager";
stream = rautemusik "partyhits";
tags = [tags.schlager];
}
{
station = rautemusik-name "Deutschrap Charts";
stream = rautemusik "deutschrap-charts";
desc = "Deutschrap, HipHop, Rap, Charts";
tags = [tags.rap];
}
{
station = rautemusik-name "Deutschrap Classic";
stream = rautemusik "deutschrap-classic";
desc = "Oldschool, Rap, HipHop, Deutschrap";
tags = [tags.rap];
}
{
station = rautemusik-name "ChartHits";
stream = rautemusik "ChartHits";
desc = "House, RnB, Dance, Electro";
tags = [tags.top40];
}
{
station = rautemusik-name "BreakZ.FM";
stream = rautemusik "breakz";
desc = "RnB, House, HipHop, Dance, Mixtapes";
tags = [tags.top40];
}
{
station = rautemusik-name "Bass";
stream = rautemusik "bass";
desc = "DnB, Dubstep, Trap & Bass House";
tags = [tags.party];
}
{
station = rautemusik-name "12punks";
stream = rautemusik "12punks";
desc = "Punk, Punk Rock, Ska, Hardcore";
tags = [tags.rock];
}
{ {
logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png"; logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png";
station = "Raidió Rírá"; station = "Raidió Rírá";
@@ -1406,12 +1211,6 @@ in
desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!"; desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!";
tags = [tags.top40]; tags = [tags.top40];
} }
{
stream = "http://188.247.86.67:8008";
station = "Rotana Tarab";
logo = "https://liveonlineradio.net/wp-content/uploads/2017/11/Rotana-Tarab-100x47.jpg";
tags = [tags.trad tags.arabic];
}
{ {
stream = "http://asima.out.airtime.pro:8000/asima_a"; stream = "http://asima.out.airtime.pro:8000/asima_a";
station = "Asima"; station = "Asima";
@@ -1554,6 +1353,11 @@ in
desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen."; desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen.";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "NIUS";
stream = "https://nius.stream25.radiohost.de/live_mp3-192";
tags = [tags.text];
}
{ {
station = "Kontrafunk"; station = "Kontrafunk";
stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3"; stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3";
@@ -1649,21 +1453,6 @@ in
station = "ERTU Al Quran Al Kareem"; station = "ERTU Al Quran Al Kareem";
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
} }
{
stream = "http://149.28.52.216:3344/listen.mp3";
station = "Verse 24/7 Holy Quran";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Kilid Herat";
tags = [tags.arabic tags.holy]; # nasheeds
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Radio Salam Watandar";
tags = [tags.arabic tags.holy];
}
{ {
stream = "http://onair15.xdevel.com:7064/1/"; stream = "http://onair15.xdevel.com:7064/1/";
station = "Radio Mozart Italia"; station = "Radio Mozart Italia";
@@ -1671,12 +1460,6 @@ in
desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo"; desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo";
tags = [tags.classical]; tags = [tags.classical];
} }
{
stream = "http://onair7.xdevel.com:7126/1/";
station = "Opera Radio Budapest";
logo = "https://www.opera.hu/static/default/asset/img/common/opera-logo.svg";
tags = [tags.classical];
}
{ {
stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3"; stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3";
station = "Peaceful Piano"; station = "Peaceful Piano";
@@ -1846,11 +1629,6 @@ in
stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3"; stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3";
tags = [tags.hebrew]; tags = [tags.hebrew];
} }
{
station = "Digital Impulse Classical Channel";
stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical];
}
{ {
station = "Старое радио (детское)"; station = "Старое радио (детское)";
stream = "http://195.91.237.50:8000/detskoe128"; stream = "http://195.91.237.50:8000/detskoe128";
@@ -1921,18 +1699,23 @@ in
stream = "http://cw.dimebank.com:8080/CNNfast"; stream = "http://cw.dimebank.com:8080/CNNfast";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "80s80s | Dark Wave";
stream = "https://streams.80s80s.de/darkwave/mp3-192/homepage/";
tags = [tags.wave];
}
{
station = "80s80s | Wave";
stream = "https://streams.80s80s.de/wave/mp3-192/homepage/";
tags = [tags.wave];
}
{ {
station = "XXX orchestral"; station = "XXX orchestral";
stream = "http://orion.shoutca.st:8978/stream"; stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical]; tags = [tags.classical];
} }
{ {
station = "XXX greek"; station = "Kral FM Xanthi";
stream = "http://radio.hostchefs.net:8046/stream?1520818130148";
tags = [tags.greek];
}
{
station = "XXX turkish or greek";
stream = "https://onairmediagroup.live24.gr/kralfm100xanthi"; stream = "https://onairmediagroup.live24.gr/kralfm100xanthi";
tags = [tags.greek tags.turkish]; tags = [tags.greek tags.turkish];
} }
@@ -1986,11 +1769,6 @@ in
stream = "http://s2.voscast.com:12312/;"; stream = "http://s2.voscast.com:12312/;";
station = "Bahrain Quran Radio"; station = "Bahrain Quran Radio";
} }
{
tags = [tags.arabic tags.text tags.holy];
stream = "http://162.244.81.30:8224/;";
station = "Quran Radio Lebanon";
}
{ {
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/"; stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/";
@@ -2001,16 +1779,6 @@ in
station = "Coptic for God"; station = "Coptic for God";
stream = "http://66.70.249.70:5832/stream"; stream = "http://66.70.249.70:5832/stream";
} }
{
stream = "http://stream-025.zeno.fm/5y95pu36sm0uv?";
station = "Hayat FM";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "http://uk2.internet-radio.com:8151/stream";
station = "The Quran Radio";
tags = [tags.arabic tags.text tags.holy];
}
{ {
stream = "http://www.radioeins.de/livemp3"; stream = "http://www.radioeins.de/livemp3";
station = "radioeins | RBB"; station = "radioeins | RBB";
@@ -2025,9 +1793,17 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3"; stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH"; station = "Hitradio FFH";
} }
{
stream = "https://mp3.planetradio.de/planetradio/hqlivestream.aac";
station = "planet radio";
}
{ # Lex Fridman's favourite { # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown"; stream = "av://lavfi:anoisesrc=color=brown";
station = "Brownian noise"; station = "Brown noise";
}
{
stream = "av://lavfi:anoisesrc=color=pink";
station = "Pink noise";
} }
{ {
stream = "https://st03.sslstream.dlf.de/dlf/03/high/aac/stream.aac"; stream = "https://st03.sslstream.dlf.de/dlf/03/high/aac/stream.aac";

View File

@@ -1,47 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
htgen = pkgs.callPackage ../packages/htgen.nix {};
in {
options.services.htgen = lib.mkOption {
default = {};
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
options = {
enable = lib.mkEnableOption "htgen-${config._module.args.name}";
port = lib.mkOption {
type = lib.types.int;
};
script = lib.mkOption {
type = lib.types.str;
};
};
}));
};
config = {
systemd.services =
lib.mapAttrs' (
name: cfg:
lib.nameValuePair "htgen-${name}" {
wantedBy = ["multi-user.target"];
after = ["network.target"];
environment = {
HOME = "/var/lib/htgen-${name}";
HTGEN_PORT = toString cfg.port;
HTGEN_SCRIPT = cfg.script;
};
serviceConfig = {
SyslogIdentifier = "htgen-${name}";
DynamicUser = true;
StateDirectory = "htgen-${name}";
PrivateTmp = true;
Restart = "always";
ExecStart = "${htgen}/bin/htgen --serve";
};
}
)
config.services.htgen;
};
}

View File

@@ -1,10 +1,10 @@
{ writers, chromium }: { coreutils, chromium }:
writers.writeDashBin "cro" '' chromium.override {
${chromium}/bin/chromium \ commandLineArgs = [
--disable-sync \ "--disable-sync"
--no-default-browser-check \ "--no-default-browser-check"
--no-first-run \ "--no-first-run"
--user-data-dir="$(mktemp -d)" \ "--user-data-dir=$(${coreutils}/bin/mktemp -d)"
--incognito \ "--incognito"
"$@" ];
'' }

View File

@@ -1,31 +0,0 @@
{
fetchgit,
lib,
pkgs,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "htgen";
version = "1.3.1";
src = fetchgit {
url = "http://cgit.krebsco.de/htgen";
rev = "refs/tags/${version}";
sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r";
};
installPhase = ''
mkdir -p $out/bin
{
echo '#! ${pkgs.dash}/bin/dash'
echo 'export PATH=${lib.makeBinPath [
pkgs.coreutils
pkgs.jq
pkgs.ucspi-tcp
]}''${PATH+":$PATH"}'
sed 's:^Server=htgen$:&/${version}:' htgen
} > $out/bin/htgen
chmod +x $out/bin/htgen
cp -r examples $out
'';
}

Submodule secrets updated: 236a3353a7...3f3a8d1334

View File

@@ -9,7 +9,7 @@ in {
./hardware-configuration.nix ./hardware-configuration.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
../../configs/default.nix ../../configs/default.nix
../../configs/0ad.nix ../../configs/gaming.nix
# ../../configs/gnome.nix # ../../configs/gnome.nix
]; ];

View File

@@ -15,6 +15,7 @@ in {
./go-webring.nix ./go-webring.nix
./gemini.nix ./gemini.nix
./wallabag.nix ./wallabag.nix
./nethack.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/mycelium.nix ../../configs/mycelium.nix
../../configs/tor.nix ../../configs/tor.nix

60
systems/ful/nethack.nix Normal file
View File

@@ -0,0 +1,60 @@
{
networking.firewall.allowedTCPPorts = [ 22 ];
containers.nethack = {
autoStart = true;
forwardPorts = [
{
containerPort = 22;
hostPort = 22;
}
];
config =
{ pkgs, ... }:
{
system.stateVersion = "25.11";
networking.hostName = "nethack";
services.openssh.enable = true;
environment.systemPackages = [ pkgs.nethack ];
programs.tmux.enable = true;
programs.tmux.extraConfig = ''
set -g mouse on
set -g allow-rename off
set -g detach-on-destroy off
unbind-key C-b
set -g prefix None
'';
users.users.nethack = {
isNormalUser = true;
home = "/home/nethack";
createHome = true;
shell = pkgs.bash;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAA...yourkey"
"ssh-ed25519 AAAA...friendkey"
];
};
services.openssh.settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
services.openssh.extraConfig = ''
Match User nethack
ForceCommand ${pkgs.tmux}/bin/tmux attach -t nethack || \
${pkgs.tmux}/bin/tmux new -s nethack ${pkgs.nethack}/bin/nethack
AllowTcpForwarding no
X11Forwarding no
PermitTTY yes
'';
};
};
}

View File

@@ -7,8 +7,10 @@ in {
defaultOptions.settings = { defaultOptions.settings = {
USER_DEFINED_DEFAULT = true; USER_DEFINED_DEFAULT = true;
}; };
instances = { instances = let instance = "gitea"; in {
"gitea".settings = { ${instance}.settings = {
BIND = "/run/anubis/anubis-${instance}/anubis.sock";
METRICS_BIND = "/run/anubis/anubis-${instance}/anubis-metrics.sock";
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}"; TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true; USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true; OG_PASSTHROUGH = true;

View File

@@ -3,7 +3,8 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
tarotPort = 7407; tarotPort = 7407;
tarotFiles = pkgs.fetchzip { tarotFiles = pkgs.fetchzip {
url = "https://c.krebsco.de/tarot.zip"; url = "https://c.krebsco.de/tarot.zip";
@@ -14,33 +15,45 @@
url = "http://c.krebsco.de/tarot.pdf"; url = "http://c.krebsco.de/tarot.pdf";
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx"; sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
}; };
in { in
services.htgen.tarot = { {
port = tarotPort; systemd.services.tarot = {
script = ''. ${pkgs.writers.writeDash "tarot" '' enable = true;
case "$Method $Request_URI" in serviceConfig.Type = "simple";
"GET /") wantedBy = [ "multi-user.target" ];
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then serviceConfig.ExecStart = pkgs.writers.writePython3 "tarot-server" {
card=$(mktemp --tmpdir tarot.XXX) libraries = py: [ py.pillow py.flask ];
trap 'rm $card' EXIT } ''
reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1) from flask import Flask, send_file
if [ "$reverse" -eq 1 ]; then from pathlib import Path
${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card" from random import choice, randint
else from io import BytesIO
${pkgs.coreutils}/bin/cp "$item" "$card" from PIL import Image
fi
printf 'HTTP/1.1 200 OK\r\n' app = Flask(__name__)
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")" TAROT_DIR = Path("${tarotFiles}")
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card") @app.route("/")
printf '\r\n' def tarot():
cat "$card" card_path = choice(list(TAROT_DIR.glob("*")))
exit
fi with Image.open(card_path) as img:
;; if randint(0, 1):
esac img = img.rotate(180)
''}''; buf = BytesIO()
img.save(buf, format="JPEG")
buf.seek(0)
return send_file(
buf,
mimetype='image/jpeg',
as_attachment=False
)
if __name__ == "__main__":
app.run(port=${toString tarotPort})
'';
}; };
niveum.passport.services = [ niveum.passport.services = [
@@ -55,7 +68,7 @@ in {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations = { locations = {
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}"; "/".proxyPass = "http://127.0.0.1:${toString tarotPort}/";
"/files/" = { "/files/" = {
root = pkgs.linkFarm "tarot" [ root = pkgs.linkFarm "tarot" [
{ {

View File

@@ -74,6 +74,40 @@ in {
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
systemd.services.update-containers = {
startAt = "Mon 02:00";
script = ''
images=$(${pkgs.podman}/bin/podman ps -a --format="{{.Image}}" | sort -u)
for image in $images; do
${pkgs.podman}/bin/podman pull "$image"
done
'';
serviceConfig = {
Type = "oneshot";
Restart = "on-failure";
RestartSec = "1h";
};
};
systemd.services.restart-homeassistant = {
startAt = "Tue 02:00";
script = ''
${pkgs.systemd}/bin/systemctl try-restart podman-homeassistant.service
'';
serviceConfig = {
Type = "oneshot";
};
};
virtualisation.podman = {
enable = true;
autoPrune = {
enable = true;
flags = ["--all"];
};
};
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
@@ -82,6 +116,9 @@ in {
"${playlistDirectoryPath}:/media" "${playlistDirectoryPath}:/media"
"/run/dbus:/run/dbus:ro" "/run/dbus:/run/dbus:ro"
]; ];
# needed for bluetooth
capabilities.NET_ADMIN = true;
capabilities.NET_RAW = true;
environment.TZ = "Europe/Berlin"; environment.TZ = "Europe/Berlin";
image = "ghcr.io/home-assistant/home-assistant:stable"; image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [ extraOptions = [