mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(radio-news): most recent commits show
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) serveHtml;
|
||||
remote = "https://cgit.lassul.us/stockholm";
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml <niveum/lib/radio-news.html> pkgs;
|
||||
|
||||
systemd.services.stockholm-history = {
|
||||
startAt = "hourly";
|
||||
script = ''
|
||||
stockholm=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$stockholm"
|
||||
}
|
||||
${pkgs.git}/bin/git clone ${remote} "$stockholm"
|
||||
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
|
||||
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
|
||||
| ${pkgs.curl}/bin/curl -Ssfd @- http://prism.r:7999/
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user