all repos — char/flake @ f691cf29089b3889be11ff7d4cfe7fb3c0712ea1

nixos flake

(cringe) https -> http svc:home on tailscale
Charlotte Som charlotte@som.codes
Wed, 15 Jul 2026 17:31:01 +0100
commit

f691cf29089b3889be11ff7d4cfe7fb3c0712ea1

parent

c38e2de85140f4267b031f149f584afd7fe56839

1 files changed, 21 insertions(+), 4 deletions(-)

jump to
M profiles/runestone/home-assistant.nixprofiles/runestone/home-assistant.nix

@@ -1,4 +1,4 @@

-{ ... }: +{ config, ... }: { services.home-assistant = { enable = true;

@@ -20,9 +20,26 @@ };

}; }; - services.tailscale.serve = { - enable = true; + systemd.services.tailscale-serve-home-assistant = { + description = "Tailscale Serve for Home Assistant"; + after = [ + "home-assistant.service" + "tailscaled.service" + "tailscaled-autoconnect.service" + "tailscaled-set.service" + ]; + wants = [ + "home-assistant.service" + "tailscaled.service" + ]; + wantedBy = [ "multi-user.target" ]; - services.home.endpoints."tcp:443" = "http://127.0.0.1:8123"; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStartPre = "-${config.services.tailscale.package}/bin/tailscale serve clear svc:home"; + ExecStart = "${config.services.tailscale.package}/bin/tailscale serve --bg --service svc:home --https=443 http://127.0.0.1:8123"; + ExecStop = "-${config.services.tailscale.package}/bin/tailscale serve clear svc:home"; + }; }; }