Open sorki opened 2 years ago
This is difficult to achieve in Nix, as it does not preserve the order of attribute sets internally.
See also: https://github.com/NixOS/nixpkgs/issues/81986
I'm not sure how to fix this on the Nix side, as these would look uglier than your workaround. Does it make sense to bring this upstream, so that klipper's parser does not assume any ordering?
I see. I'm fine with the workaround but I'll create an upstream issue if I can't fix it easily.
A possible solution is making the argument a list of attribute sets.
This is a minor issue I've discovered recently -
I'm unable to configure additional thermistor and sensor using it via
services.klipper.settings
because klipper expects[thermistor ...]
section to come before[temperature_sensor ...]
section.This seems to be caused by Nix settings -> INI output which sorts the sections based on their name and after skimming the output format implementation I didn't see a way to disable sorting (not sure if it's a Nix thing or INI output thingie).
Ideally the output would match the order in which settings are defined in Nix.
Snippet with a workaround from my configuration:
CC @lovesegfault @vtuan10