From 7d7d6cca429220ad123c6caae12ab47fa27baff5 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Thu, 3 Apr 2025 12:43:22 -0400 Subject: [PATCH] trying to get taskwarrior web to work nicely --- homes/media/default.nix | 1 + hosts/media-server/configuration.nix | 14 +++++++------- modules/home/taskwarrior-web.nix | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/homes/media/default.nix b/homes/media/default.nix index cc17013..5d53adb 100644 --- a/homes/media/default.nix +++ b/homes/media/default.nix @@ -12,6 +12,7 @@ home = { packages = with pkgs; [ btop + python3 ]; username = "media"; diff --git a/hosts/media-server/configuration.nix b/hosts/media-server/configuration.nix index c86666a..055e5f5 100644 --- a/hosts/media-server/configuration.nix +++ b/hosts/media-server/configuration.nix @@ -60,9 +60,8 @@ }; networking.hostName = "media-server"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + networking.firewall.allowedTCPPorts = [ 80 443 3000 ]; # Set your time zone. time.timeZone = "America/Toronto"; @@ -81,6 +80,7 @@ wget curl cifs-utils + caddy taskchampion-sync-server ]; @@ -193,12 +193,12 @@ services.caddy = { enable = true; virtualHosts = { - "media-server:3000".extraConfig = '' -reverse_proxy http://localhost:3000 { - header_down X-Real-IP {http.request.remote} - header_down X-Forwarded-For {http.request.remote} -} + "media-server" = { + serverAliases = [ "media-server" "media-server.local" ]; + extraConfig = '' +reverse_proxy localhost:3000 ''; + }; }; }; diff --git a/modules/home/taskwarrior-web.nix b/modules/home/taskwarrior-web.nix index 5e95ae8..3dfc2c1 100644 --- a/modules/home/taskwarrior-web.nix +++ b/modules/home/taskwarrior-web.nix @@ -14,10 +14,11 @@ Type = "simple"; ExecStart = "/home/media/.local/bin/tww/taskwarrior-web"; Restart = "always"; + WorkingDirectory = "/home/media/.local/bin/tww/"; }; }; home.file.".local/bin/tww" = { - source = ../../modules/home/tww; + source = ./tww; }; }