mirror of
https://github.com/kmein/niveum
synced 2026-03-22 21:01:07 +01:00
Compare commits
4 Commits
0656b0eaa3
...
2217128f32
| Author | SHA1 | Date | |
|---|---|---|---|
| 2217128f32 | |||
| 3ed79dbbfc | |||
| 6c7fa8c1b5 | |||
| c36dc50369 |
@@ -33,6 +33,9 @@ let
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
'';
|
||||
ocr = pkgs.writers.writeDash "gocr" ''
|
||||
${pkgs.netpbm}/bin/pngtopnm - | ${pkgs.gocr}/bin/gocr -
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ in {
|
||||
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
|
||||
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
|
||||
{
|
||||
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -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 $date -R Uranus Neptune Pluto
|
||||
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d
|
||||
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date
|
||||
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
|
||||
'');
|
||||
};
|
||||
|
||||
14
flake.lock
generated
14
flake.lock
generated
@@ -158,11 +158,11 @@
|
||||
"retiolum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1640969743,
|
||||
"narHash": "sha256-Fj4J6EI2nSyvols9bGuettG/K9Bc7JMbjCGVG4dFNDI=",
|
||||
"lastModified": 1641415159,
|
||||
"narHash": "sha256-QlJGc9Hnp8sBgcljLeus/4nZppRxVARMJO4kAD6P/04=",
|
||||
"owner": "krebs",
|
||||
"repo": "retiolum",
|
||||
"rev": "30b9842d65ccb2b89aaa4ae470a6615042a907f2",
|
||||
"rev": "aa65c68493f042d7ad5012249b4aafc4ee59b8f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -210,11 +210,11 @@
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641167244,
|
||||
"narHash": "sha256-uYob8g6RbRL9niEQNk9G1TldVCrzOu+kxEFEQ+IAFkM=",
|
||||
"lastModified": 1641414848,
|
||||
"narHash": "sha256-4tZyxhy6Sh5+FbQ2x++2MIhq96uKpNPKcEG1oWaHP98=",
|
||||
"ref": "master",
|
||||
"rev": "2313e962e2ac6dc6f1f59800d793101f958e8b37",
|
||||
"revCount": 10254,
|
||||
"rev": "deda4c978956e39c3b6345e5ef5604b2bc020e00",
|
||||
"revCount": 10262,
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
},
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
{ 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;
|
||||
};
|
||||
}
|
||||
@@ -4,13 +4,13 @@ let
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./bvg.nix
|
||||
./gaslight.nix
|
||||
./hardware-configuration.nix
|
||||
./kiosk.nix
|
||||
./moodle-dl-meinhark.nix
|
||||
./pulseaudio.nix
|
||||
./tuna.nix
|
||||
./grocy.nix
|
||||
<home-manager/nixos>
|
||||
<niveum/configs/keyboard.nix>
|
||||
<niveum/configs/monitoring.nix>
|
||||
|
||||
10
systems/zaatar/grocy.nix
Normal file
10
systems/zaatar/grocy.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
services.grocy = {
|
||||
enable = true;
|
||||
hostName = "grocy.kmein.r";
|
||||
nginx.enableSSL = false;
|
||||
settings.calendar.firstDayOfWeek = 1;
|
||||
settings.culture = "de";
|
||||
settings.currency = "EUR";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user