diff options
author | stuebinm | 2023-02-24 01:25:03 +0100 |
---|---|---|
committer | stuebinm | 2023-02-24 01:25:03 +0100 |
commit | 93a3059cd625d147a72e395a155990edbabf6990 (patch) | |
tree | 40b176f4d9b562ab3b518abeace297665a9a2d06 /chaski/services | |
parent | 06ea6d3f8c522b8d730775bbbac1b0b2098d864c (diff) |
chaski/tracktrain: make the css editable via http
Diffstat (limited to '')
-rw-r--r-- | chaski/services/tracktrain.nix | 17 |
1 files changed, 16 insertions, 1 deletions
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 = { |