Skip to content

feat(#540): expose NetworkManager global DNS configuration - #549

Merged
cachebag merged 2 commits into
freedesktop-rs:masterfrom
sage-s11:feat/540-global-dns-configuration
Sep 8, 2026
Merged

feat(#540): expose NetworkManager global DNS configuration#549
cachebag merged 2 commits into
freedesktop-rs:masterfrom
sage-s11:feat/540-global-dns-configuration

Conversation

@sage-s11

@sage-s11 sage-s11 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Read/write GlobalDnsConfiguration on /org/freedesktop/NetworkManager
  • Typed GlobalDnsConfiguration / GlobalDnsDomain (searches, options, domains["*"].servers)
  • NetworkManager::global_dns_configuration() / set_global_dns_configuration()
  • Empty value sends an empty dict and clears the override

Closes #540

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p nmrs --lib --all-features
  • cargo test --doc --all-features --workspace
  • cargo test --all-features --workspace
  • git diff --check

Docker integration was not run locally (Docker is not installed). The ignored networkmanager_global_dns_configuration_round_trip test is in the existing harness for CI.

AI assistance

Used Copilot to understand project structure, locate dependencies/concerned functions, modify docs, debug compilation errors and write PR description. I reviewed the diff and ran the validation above.

@cachebag cachebag added feature New feature or request api-surface Public API design, re-exports, and semver-relevant changes tests Add, remove or adjust tests dbus D-Bus types, signatures, or NM D-Bus API nm-compat NetworkManager compatibility or runtime rejection labels Sep 8, 2026
@sage-s11
sage-s11 deployed to self-hosted-pr-integration September 8, 2026 16:19 — with GitHub Actions Active
@cachebag

cachebag commented Sep 8, 2026

Copy link
Copy Markdown
Member

Docker integration was not run locally (Docker is not installed). The ignored networkmanager_global_dns_configuration_round_trip test is in the existing harness for CI.

Can you not install Docker? I'm not sure why you included this part since the contribution guide states you should attempt to run these locally.

I only bring this up since the harness runs on my self-hosted runner and I prefer not doing that for new contributors (at least until, some sort of validation has been made on their end of course and/or the PR is approved on my end).

@sage-s11

This comment was marked as low quality.

@cachebag cachebag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Comment thread nmrs/CHANGELOG.md Outdated
Comment thread nmrs/src/core/dns.rs Outdated
Comment thread nmrs/src/api/models/dns.rs
Comment thread nmrs/src/api/models/dns.rs
Comment thread nmrs/src/api/network_manager.rs
…docs

Move the changelog entry under Added, document public fields,
add GlobalDnsConfiguration::validate() for the default-domain
and servers rules, and note conf/polkit write failures.

@cachebag cachebag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sage-s11
sage-s11 had a problem deploying to self-hosted-pr-integration September 8, 2026 19:18 — with GitHub Actions Failure
@sage-s11
sage-s11 had a problem deploying to self-hosted-pr-integration September 8, 2026 19:26 — with GitHub Actions Failure
@cachebag
cachebag merged commit a616de8 into freedesktop-rs:master Sep 8, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-surface Public API design, re-exports, and semver-relevant changes dbus D-Bus types, signatures, or NM D-Bus API feature New feature or request nm-compat NetworkManager compatibility or runtime rejection tests Add, remove or adjust tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Global DNS configuration

2 participants