Skip to content

flags should override config #16

@sedlund

Description

@sedlund

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! 🍻

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions