diff --git a/desktop/ftl.host.nix b/desktop/ftl.host.nix index d7b433d..6dc35b9 100644 --- a/desktop/ftl.host.nix +++ b/desktop/ftl.host.nix @@ -26,6 +26,13 @@ in { wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; + # Create directory for log files + preStart = '' + mkdir -p "$(dirname ${tunnel.logPath})" + touch ${tunnel.logPath} + chmod 644 ${tunnel.logPath} + ''; + serviceConfig = { ExecStart = "${pkgs.cloudflared}/bin/cloudflared access tcp --hostname ${tunnel.remoteHost} --url ${tunnel.remoteTarget} --port ${toString tunnel.localBindPort} --logfile ${tunnel.logPath}"; Restart = "always";