1
0
mirror of https://github.com/kmein/niveum synced 2026-03-17 18:41:09 +01:00

feat: add grimm dwb scroller

This commit is contained in:
2022-09-08 08:47:11 +02:00
parent 2280b21a75
commit d751ecdab7
3 changed files with 34 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ in {
./monitoring
./moodle-dl-borsfaye.nix
./names.nix
./grimm.nix
./nextcloud.nix
./radio-news.nix
./radio.nix

30
systems/makanek/grimm.nix Normal file
View File

@@ -0,0 +1,30 @@
{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];
}