stylix/testbeds: don't unnecessarily use an IFD#2019
stylix/testbeds: don't unnecessarily use an IFD#20190xda157 wants to merge 1 commit intonix-community:masterfrom
Conversation
MattSturgeon
left a comment
There was a problem hiding this comment.
Initial review from my phone, so I can't do any testing or verification. But here are my thoughts and questions:
| stylix = { | ||
| enable = true; | ||
| image = images.dark; | ||
| base16Scheme = "${tinted-schemes}/base16/catppuccin-macchiato.yaml"; |
There was a problem hiding this comment.
Although this is technically importing from an input derivation, IIUC it doesn't really count as IFD because flake inputs are special and get made available in the nix store before evaluation starts.
So unless flake-compat and flake.parts partitions are breaking that assumption, I don't think this is a problematic import. Maybe I was wrong to call out IFD in your testbeds?
IFD is normally an issue because the derivation has to get built part-way through the eval.
Looking elsewhere, it looks like base16Scheme gets used in:
lib.stylix.colors = (cfg.base16.mkSchemeAttrs cfg.base16Scheme).override cfg.override;And that is a function that also comes from a flake input. So if you completely wanted to avoid IFD bootstrapping I think you'd need to see lib.stylix.colors directly.
Does cfg.base16 itself do any IFD? Does it behave differently when given a yaml file path vs an attrset? Did you notice any performance differences with this change?
indeed,
with my config replacing
I'm not really sure what this means... we can't just disable IFDs because the palette generator uses an IFD. |
inspired by #1985 (comment), cc @MattSturgeon @danth @trueNAHO