breadcrumbs now speaks `org.freedesktop.NetworkManager` on the system bus directly (new `zbus` dependency) — no `nmcli` subprocesses for connect, scan, status, or the watch loop. Why: - Wi-Fi PSKs and 802.1x passwords no longer touch a command line. They travel inside `AddAndActivateConnection2` / `Update2` settings payloads, so they are never visible to other local users via `/proc/<pid>/cmdline`. This fully supersedes the earlier "feed the PSK to `nmcli --ask` on stdin" approach. - The watch loop reacts to real `Device.StateChanged` / connectivity signals instead of parsing `nmcli monitor` text. - Connect waits on the device actually reaching the ACTIVATED state rather than trusting `nmcli --wait`. Config: `settings.nmcli_wait` is renamed to `connect_wait`; the old key is still accepted via `#[serde(alias)]`. `status.rs` loses its private `ipv4()` nmcli helper in favour of `nm::ipv4_address`. `util::run_with_stdin` stays (tailscale still uses it) but no longer carries secrets.
49 lines
1.8 KiB
TOML
49 lines
1.8 KiB
TOML
# breadcrumbs configuration template.
|
|
#
|
|
# Copy to ~/.config/breadcrumbs/breadcrumbs.toml and fill in real values, OR
|
|
# just run breadcrumbs once (it generates a skeleton) and then use
|
|
# `breadcrumbs add` / `breadcrumbs edit` to fill in your networks.
|
|
# The real breadcrumbs.toml is gitignored and never committed.
|
|
#
|
|
# Saved networks (SSID + optional local password) live in a separate file,
|
|
# networks.toml, in the same directory — not here. See
|
|
# networks.example.toml for its format; in practice you never hand-edit it,
|
|
# `breadcrumbs add` / `scan` / `forget` manage it for you. This file is just
|
|
# settings + the location profiles built from those saved networks.
|
|
|
|
[settings]
|
|
dns = "1.1.1.1"
|
|
connect_wait = 8
|
|
exit_node = "my-exit-node" # Tailscale hostname of your preferred exit node
|
|
default_profile = "away"
|
|
watch_interval = 12
|
|
connectivity_url = "http://connectivitycheck.gstatic.com/generate_204"
|
|
ping_host = "1.1.1.1"
|
|
|
|
# Location state machine. Switch with: breadcrumbs profile set <name>
|
|
#
|
|
# detect_ssids: list any SSIDs that reliably indicate you are at this location.
|
|
# `breadcrumbs detect` scans for visible networks and switches to the first
|
|
# profile whose detect_ssids list contains a match. Profiles without
|
|
# detect_ssids are skipped during detection; the default_profile is used as
|
|
# the final fallback.
|
|
|
|
[profiles.away]
|
|
networks = ["HomeWifi"]
|
|
tailscale = false
|
|
include_all_known = true
|
|
# No detect_ssids: "away" is the catch-all fallback (set as default_profile).
|
|
|
|
[profiles.home]
|
|
networks = ["HomeWifi"]
|
|
tailscale = false
|
|
include_all_known = false
|
|
detect_ssids = ["HomeWifi"]
|
|
|
|
[profiles.work]
|
|
bootstrap = "WorkGuest" # connect here first so Tailscale can come up
|
|
networks = ["CorpWifi"]
|
|
tailscale = true
|
|
exit_node = "my-exit-node"
|
|
include_all_known = false
|
|
detect_ssids = ["CorpWifi", "WorkGuest"]
|