Skip to content

modules/btop: fix unnecessary rebuilds when flake source changes#124

Open
adeci wants to merge 1 commit intoLassulus:mainfrom
adeci:btop
Open

modules/btop: fix unnecessary rebuilds when flake source changes#124
adeci wants to merge 1 commit intoLassulus:mainfrom
adeci:btop

Conversation

@adeci
Copy link
Contributor

@adeci adeci commented Feb 20, 2026

Using toString on a path inside a flake gives you a string with the source tree hash baked in. So when you override .path with a nix path literal (like "btop.conf".path = ./btop.conf;), any change to any tracked file in the consuming flake rebuilds btop, even if the config file didn't change...

String interpolation ("${...}") instead of toString will have nix content-address the file on its own, so the wrapper will only rebuild when the config actually changes. This same toString pattern exists in all the other modules too. Could also be fixed at the types.file level with an apply, but only keeping this scoped to btop for now.

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