From 6043552115f1629b72fc40564eba4fd34f9a5cb6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jul 2023 17:21:20 +0200 Subject: [PATCH] reaktor2: extract agenda.html into separate file --- krebs/2configs/agenda.html | 91 +++++++++++++++++++++++++++ krebs/2configs/reaktor2.nix | 120 ++++-------------------------------- 2 files changed, 104 insertions(+), 107 deletions(-) create mode 100644 krebs/2configs/agenda.html diff --git a/krebs/2configs/agenda.html b/krebs/2configs/agenda.html new file mode 100644 index 000000000..9ccfc241c --- /dev/null +++ b/krebs/2configs/agenda.html @@ -0,0 +1,91 @@ + + + + Agenda + + + + + +
+ + + diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 8837f0aa5..c357da1d7 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -483,113 +483,19 @@ in { ''}''; }; - services.nginx = { - virtualHosts."agenda.r" = { - serverAliases = [ "kri.r" ]; - locations."= /index.html".extraConfig = '' - alias ${pkgs.writeText "agenda.html" '' - - - - Agenda - - - - - -
- - - - ''}; - ''; - locations."/agenda.json".extraConfig = '' - proxy_set_header Host $host; - proxy_pass http://localhost:8009; - ''; - extraConfig = '' - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - ''; - }; + services.nginx.virtualHosts."agenda.r" = { + serverAliases = [ "kri.r" ]; + locations."= /index.html".extraConfig = '' + alias ./agenda.html; + ''; + locations."/agenda.json".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:8009; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; }; systemd.services.reaktor2-r.serviceConfig.DynamicUser = mkForce false;