Skip to content

fix(config): accept leaf symlinks for user-global configuration files - #85

Merged
lg2m merged 1 commit into
mainfrom
fix/github-83-global-config-symlinks
Sep 20, 2026
Merged

lg2m merged 1 commit into
mainfrom
fix/github-83-global-config-symlinks

Conversation

@lg2m

@lg2m lg2m commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

GitHub #83: Home Manager global config.ron is a symlink

Spec: GitHub #83; ADR-0035
Linear: none (GitHub-only issue)

What changed

  • discover_file admits a SourceKind::Global leaf symlink when the resolved target is a regular file (config.ron, config.d/*.ron, and the same path used by global tui.ron / themes/*.ron).
  • Ancestors, including the global directory itself, still must be ordinary directories.
  • Project, explicit, managed, pack, and trust sources still reject symbolic links.
  • Provenance records the canonical target path.

How verified

  • cargo test -p qq-config symlink — 10 passed
  • cargo test -p qq-config — 88 passed
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace
  • cargo build --workspace
  • Acceptance tests: accepts_global_leaf_symlink_to_a_regular_file, accepts_global_fragment_leaf_symlink_to_a_regular_file, rejects_project_leaf_symlink_sources, rejects_global_directory_symlink, rejects_symlink_sources

Measurements

No named performance gate for this change.

Docs

  • docs/adr/0035-global-leaf-config-symlinks.md
  • docs/adr/README.md
  • docs/design/architecture.md
  • docs/design/theme.md
  • docs/runbooks/local-dev.md
  • docs/README.md
  • docs/plans/progress/root.md (ADR-0035 reserved and accepted)
  • docs/plans/progress/decisions-needed.md (row 8)

Compatibility

  • PROTOCOL / DESCRIPTOR / schema: unchanged

Follow-ups / decisions needed

  • None. A Home Manager module is not required for this path.

Closes #83.

Home Manager writes ~/.config/qq/config.ron as a symlink to a regular Nix store file. discover_file rejected every symlink, so that global file never loaded.

SourceKind::Global now admits a leaf symlink whose resolved target is a regular file. Ancestors, including the global directory itself, stay ordinary directories. Project, explicit, managed, pack, and trust sources still reject symbolic links. Provenance records the canonical target.

Tests cover a global config.ron link, a config.d fragment link, a project .qq/config.ron link, and a linked global directory. ADR-0035 records the decision.

Closes #83.
@lg2m
lg2m merged commit dc902dc into main Sep 20, 2026
4 checks passed
@lg2m
lg2m deleted the fix/github-83-global-config-symlinks branch September 20, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support declaratively managed global configuration files, or provide a supported Home Manager integration path

1 participant