summaryrefslogtreecommitdiff
path: root/chaski
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chaski/services/tracktrain.nix17
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 = {