From 93a3059cd625d147a72e395a155990edbabf6990 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 24 Feb 2023 01:25:03 +0100 Subject: chaski/tracktrain: make the css editable via http --- chaski/services/tracktrain.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'chaski') diff --git a/chaski/services/tracktrain.nix b/chaski/services/tracktrain.nix index 940ad71..07a47fe 100644 --- a/chaski/services/tracktrain.nix +++ b/chaski/services/tracktrain.nix @@ -47,10 +47,14 @@ in rewrite ^/metrics/(.*) /$1 break; ''; }; + locations."/assets" = { + proxyPass = "http://192.168.42.41:4567"; + }; enableACME = true; forceSSL = true; }; + services.prometheus = { enable = true; port = 9001; @@ -94,6 +98,17 @@ in config = { config, pkgs, ... }: { + systemd.services.dufs = { + enable = true; + description = "assets for tracktrain's frontend"; + wantedBy = [ "tracktrain.service" ]; + serviceConfig.Type = "simple"; + path = [ pkgs.dufs ]; + script = '' + dufs -b 0.0.0.0 -p 4567 --path-prefix /assets --auth /@$(cat /username):$(cat /password)"@*" --auth-method basic --allow-upload --allow-delete /assets + ''; + }; + systemd.services.tracktrain = { enable = true; @@ -133,7 +148,7 @@ in ''; }; - networking.firewall.allowedTCPPorts = [ 4000 ]; + networking.firewall.enable = false; system.stateVersion = "22.05"; services.coredns = { -- cgit v1.2.3