stc icon indicating copy to clipboard operation
stc copied to clipboard

flags should override config

Open sedlund opened this issue 9 months ago • 0 comments

My Syncthing instance is configured with the startup flag --gui-address to listen on Tailscale, overriding the config file setting that specifies 127.0.0.1.

I provide the configuration file to stc for the API key and also expect to override --target using a flag that specifies the Tailscale IP.

However, it does not respect the flag override.

home-manager:

home.shellAliases.stc = "${lib.getExe pkgs.stc-cli} -homedir ${config.xdg.stateHome}/syncthing -target http://${config.services.syncthing.guiAddress}";

equivelant:

alias stc="stc --homedir ~/.local/state/syncthing --target http://$(tailscale ip -4):8384"
 stc
2025/03/21 20:58:39 stc.go:424: github.com/tenox7/stc/api.GetConfig (api.go:106): Get "http://127.0.0.1:8384/rest/config": dial tcp 127.0.0.1:8384: connect: connection refused

Very cool project, thanks very much! 🍻

sedlund avatar Mar 21 '25 13:03 sedlund