mirror of
https://github.com/kmein/niveum
synced 2026-03-19 03:21:10 +01:00
feat(zaatar): run bvg info dashboard
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/krebs/retiolum",
|
"url": "https://github.com/krebs/retiolum",
|
||||||
"rev": "72bb86741d7dcb9771b1edf2d4e015990b5ac8e9",
|
"rev": "18081c610fae81c2c911b699b9688edc4fcbcd98",
|
||||||
"date": "2021-10-05T17:02:16+02:00",
|
"date": "2021-10-10T15:32:13+02:00",
|
||||||
"path": "/nix/store/1ywia5hf3qyc2nhi5kz315wmcc30skbi-retiolum",
|
"path": "/nix/store/9mwqqmigj1z5hf7krd6fqmccqy41wc80-retiolum",
|
||||||
"sha256": "0dv63rcvmk6az2jy3v6kzm1s5j8wanps6890vzl91r3wxv23zan1",
|
"sha256": "0h3x7m5rizw73n3hnskr67qfnpkcc8qmrpqg32xzjxls582jm4rw",
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
"leaveDotGit": false
|
"leaveDotGit": false
|
||||||
|
|||||||
60
configs/bvg.nix
Normal file
60
configs/bvg.nix
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
stations = [
|
||||||
|
900068204 # A/M
|
||||||
|
900068302 # KAS
|
||||||
|
900068203 # B-P
|
||||||
|
];
|
||||||
|
fahrplanHtml = ''
|
||||||
|
<!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 = ''
|
||||||
|
default_type "text/html";
|
||||||
|
root ${pkgs.linkFarm "fahrplan" [{ name = "index.html"; path = pkgs.writeText "fahrplan.html" fahrplanHtml; }]};
|
||||||
|
index index.html;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<niveum/configs/version.nix>
|
<niveum/configs/version.nix>
|
||||||
<niveum/configs/printing.nix>
|
<niveum/configs/printing.nix>
|
||||||
<niveum/configs/traadfri.nix>
|
<niveum/configs/traadfri.nix>
|
||||||
|
<niveum/configs/bvg.nix>
|
||||||
<niveum/configs/moodle-dl/meinhark.nix>
|
<niveum/configs/moodle-dl/meinhark.nix>
|
||||||
<niveum/configs/monitoring/push.nix>
|
<niveum/configs/monitoring/push.nix>
|
||||||
{
|
{
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
user = config.users.extraUsers.kiosk.name;
|
user = config.users.extraUsers.kiosk.name;
|
||||||
extraArguments = [ "-s" ]; # allow vt switching
|
extraArguments = [ "-s" ]; # allow vt switching
|
||||||
program =
|
program =
|
||||||
let startUrls = [ "https://open.spotify.com" "http://localhost:${toString config.services.tuna.webPort}" ];
|
let startUrls = [ "https://open.spotify.com" "http://localhost:${toString config.services.tuna.webPort}" "http://bvg.kmein.r" ];
|
||||||
in pkgs.writers.writeDash "kiosk-browser" ''
|
in pkgs.writers.writeDash "kiosk-browser" ''
|
||||||
while true; do
|
while true; do
|
||||||
${pkgs.chromium}/bin/chromium \
|
${pkgs.chromium}/bin/chromium \
|
||||||
|
|||||||
Reference in New Issue
Block a user