From 200102c60759f101db8f6419667e85961ffa79b6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 26 Sep 2023 20:51:50 +0200 Subject: hotdog.r: add bedge.r --- krebs/2configs/reaktor2.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'krebs/2configs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index bc5bfc0fb..db7b794f4 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -528,6 +528,24 @@ in { ''; }; + services.nginx.virtualHosts."bedge.r" = { + locations."/".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:${toString config.services.hledger-web.port}; + ''; + locations."/bedger.json".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:8011; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; + }; + services.hledger-web = { + enable = true; + }; + systemd.services.reaktor2-r.serviceConfig.DynamicUser = mkForce false; systemd.services.reaktor2-hackint.serviceConfig.DynamicUser = mkForce false; krebs.reaktor2 = { -- cgit v1.2.3