Skip to content

fix(toml/INI placeholders): (breaking) placeholders in generated toml and INI files#367

Merged
BirdeeHub merged 2 commits intomainfrom
tomlplaceholders
Mar 24, 2026
Merged

fix(toml/INI placeholders): (breaking) placeholders in generated toml and INI files#367
BirdeeHub merged 2 commits intomainfrom
tomlplaceholders

Conversation

@BirdeeHub
Copy link
Owner

@BirdeeHub BirdeeHub commented Mar 23, 2026

made placeholders work in existing modules which generate toml files, via the same method pkgs.formats uses, just directly in config.constructFiles options instead.

This is a breaking change if you were accessing such files outside of the module, and it is not possible to add a warning for this.

For all the modules with only 1 toml file, a read-only value exists in config for each generated file under config.constructFiles.generatedConfig.outPath, which may also be grabbed from the package via passthru.configuration.constructFiles.generatedConfig.outPath.

Or, for short, "${yourpackage.configuration.constructFiles.generatedConfig}" (because passthru is upvalued and interpolation accesses .outPath)

helix and yazi which both generate directories make a passthru.generatedConfig value available to access the path from outside of the module. The individual files also still have accessible paths, under their respective names.

This change was applied to alacritty, bottom, jujutsu, tealdeer, and yazi.


The same change occurred for the ones generated via pkgs.formats.ini

Those being: cava, foot, fuzzel, mako, and notmuch.

All only generate 1 file, which you can use from within the module via a read-only option under config.constructFiles.generatedConfig.outPath, which may also be grabbed from the package via passthru.configuration.constructFiles.generatedConfig.outPath.

Or, for short, "${yourpackage.configuration.constructFiles.generatedConfig}" (because passthru is upvalued and interpolation accesses .outPath)

@BirdeeHub BirdeeHub changed the title fix(toml placeholders): fixed placeholders in generated toml files (breaking) fix(toml placeholders): (breaking) placeholders in generated toml files Mar 23, 2026
@BirdeeHub BirdeeHub force-pushed the tomlplaceholders branch 3 times, most recently from eede4cf to 808342f Compare March 23, 2026 23:08
@BirdeeHub BirdeeHub changed the title fix(toml placeholders): (breaking) placeholders in generated toml files fix(toml and INI placeholders): (breaking) placeholders in generated toml and INI files Mar 23, 2026
@BirdeeHub BirdeeHub changed the title fix(toml and INI placeholders): (breaking) placeholders in generated toml and INI files fix(toml/INI placeholders): (breaking) placeholders in generated toml and INI files Mar 23, 2026
made placeholders work in existing modules which generate toml files,
via the same method pkgs.formats uses, just directly in
config.constructFiles options instead.

This is a breaking change if you were accessing such files outside of
the module, and it is not possible to add a warning for this.

For all the modules with only 1 toml file, a read-only value exists in
config for each generated file under
`config.constructFiles.generatedConfig.outPath`, which may also be
grabbed from the package via
`passthru.configuration.constructFiles.generatedConfig.outPath`.

Or, for short,
`"${yourpackage.configuration.constructFiles.generatedConfig}"` (because
`passthru` is upvalued and interpolation accesses `.outPath`)

`helix` and `yazi` which both generate directories make a
`passthru.generatedConfig` value available to access the path from
outside of the module. The individual files also still have accessible
paths, under their respective names.

This change was applied to `alacritty`, `bottom`, `jujutsu`, `tealdeer`,
and `yazi`.

#367
cava, foot, fuzzel, mako, and notmuch all now use lib.generators ini
generators instead. As in
808342f

a read-only value exists in
config for each generated file under
`config.constructFiles.generatedConfig.outPath`, which may also be
grabbed from the package via
`passthru.configuration.constructFiles.generatedConfig.outPath`.

Or, for short,
`"${yourpackage.configuration.constructFiles.generatedConfig}"` (because
`passthru` is upvalued and interpolation accesses `.outPath`)
@BirdeeHub BirdeeHub merged commit 04ad2f8 into main Mar 24, 2026
2 checks passed
BirdeeHub added a commit that referenced this pull request Mar 24, 2026
made placeholders work in existing modules which generate toml files,
via the same method pkgs.formats uses, just directly in
config.constructFiles options instead.

This is a breaking change if you were accessing such files outside of
the module, and it is not possible to add a warning for this.

For all the modules with only 1 toml file, a read-only value exists in
config for each generated file under
`config.constructFiles.generatedConfig.outPath`, which may also be
grabbed from the package via
`passthru.configuration.constructFiles.generatedConfig.outPath`.

Or, for short,
`"${yourpackage.configuration.constructFiles.generatedConfig}"` (because
`passthru` is upvalued and interpolation accesses `.outPath`)

`helix` and `yazi` which both generate directories make a
`passthru.generatedConfig` value available to access the path from
outside of the module. The individual files also still have accessible
paths, under their respective names.

This change was applied to `alacritty`, `bottom`, `jujutsu`, `tealdeer`,
and `yazi`.

#367
@BirdeeHub BirdeeHub deleted the tomlplaceholders branch March 24, 2026 01:31
BirdeeHub added a commit that referenced this pull request Mar 24, 2026
placeholders are now usable in all options for `niri`, `opencode`, `nushell`, and `ov`

Same benefits and drawbacks as the last 2 commits, (This PR #367) just for more modules

From outside of the module, grab the path via `config.constructFiles.generatedConfig.outPath`

Still to go:

`rofi`, `waybar`, `claude-code`, `btop` and `mpv` modules

After that, everything that could reasonably support it will have this capability
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.

1 participant