Skip to content

fix: Support quoted attribute names#165

Merged
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:fix-quoted-attribute-names
Feb 10, 2026
Merged

fix: Support quoted attribute names#165
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:fix-quoted-attribute-names

Conversation

@Sporif
Copy link
Copy Markdown
Collaborator

@Sporif Sporif commented Feb 1, 2026

This PR introduces support for Nix attribute names containing spaces and dots. It involves creating two new types to represent attribute names and paths, and replacing fmt.Sprintf() calls with functions that use these types. It also adds FlakeRef and LegacyConfiguration functions to format common NixOS configuration attributes.

I have tested local flake and legacy builds, images, specialisations, VMs, and evaluation of option values. I have not tested remote building (but it should also work).

Closes #126.

@Sporif Sporif force-pushed the fix-quoted-attribute-names branch from 42ec377 to 3b18215 Compare February 1, 2026 14:43
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

This is a good start! Really appreciate the time you took for this so far.

@Sporif Sporif force-pushed the fix-quoted-attribute-names branch 2 times, most recently from 6cb3aa7 to 8b9b1fe Compare February 8, 2026 12:27
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

Couple of variable shadowing issues.

I'll enable a golangci-lint linter for this in the future, but it does tend to be rather strict. Strict may be better than lax in this case though, since Go's shadowing rules have already caused bugs in the past.

Edit: Done in #172

@Sporif Sporif force-pushed the fix-quoted-attribute-names branch from 8b9b1fe to f8ae445 Compare February 10, 2026 06:16
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

This is amazing now! I really appreciate your contributions thus far.

@water-sucks water-sucks merged commit 54cc35c into nix-community:main Feb 10, 2026
2 checks passed
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.

all: quoted attribute names are not supported correctly

2 participants