summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2023-02-24 01:25:03 +0100
committerstuebinm2023-02-24 01:25:03 +0100
commit93a3059cd625d147a72e395a155990edbabf6990 (patch)
tree40b176f4d9b562ab3b518abeace297665a9a2d06
parent06ea6d3f8c522b8d730775bbbac1b0b2098d864c (diff)
chaski/tracktrain: make the css editable via http
-rw-r--r--chaski/services/tracktrain.nix17
-rw-r--r--common/desktop.nix2
-rw-r--r--flake.lock8
3 files changed, 22 insertions, 5 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 = {
diff --git a/common/desktop.nix b/common/desktop.nix
index d5cba19..f66c349 100644
--- a/common/desktop.nix
+++ b/common/desktop.nix
@@ -61,6 +61,8 @@
auth include login
'';
+ services.davfs2.enable = true;
+
services.greetd = {
enable = true;
settings = {
diff --git a/flake.lock b/flake.lock
index c8d1557..e59a619 100644
--- a/flake.lock
+++ b/flake.lock
@@ -419,11 +419,11 @@
"tracktrain": {
"flake": false,
"locked": {
- "lastModified": 1674936614,
- "narHash": "sha256-BsF4CzI8ukthTsczo9VJIlz+9ILEMXlYMTvh0lIlzDI=",
+ "lastModified": 1677192006,
+ "narHash": "sha256-yKT01corVrYGKerZxkRcVLWDzUj2QVNCF5cGmccje3A=",
"ref": "main",
- "rev": "1612bb5aec55af06f66012ff2627f533e7a57c67",
- "revCount": 82,
+ "rev": "99463395ee9497256b794f4ad2c94b490ca5d0fd",
+ "revCount": 83,
"type": "git",
"url": "https://stuebinm.eu/git/tracktrain"
},