Refactor select with new maybe selector

This is a great refactor of the select functionality in the flake class.
This now uses the same parser as the nix code, but runs it in python for
nice stacktraces.

Also we now have a maybe selector which can be used by prepending the
selector with a ?

Tests have been expanded to make sure the code is more stable and easier
to understand
This commit is contained in:
lassulus
2025-04-19 15:20:13 -07:00
committed by Michael Hoang
parent 27077817ae
commit 5feccf4e57
9 changed files with 691 additions and 395 deletions

View File

@@ -30,6 +30,6 @@ lib.fix (clanLib: {
# Plain imports.
values = import ./introspection { inherit lib; };
jsonschema = import ./jsonschema { inherit lib; };
select = import select/default.nix;
select = self.inputs.nix-select.lib;
facts = import ./facts.nix { inherit lib; };
})