diff --git a/flake.nix b/flake.nix index cb2dff9..5dc53bb 100644 --- a/flake.nix +++ b/flake.nix @@ -36,5 +36,7 @@ }; mergeListsToAttrs = names: values: nixpkgs.lib.listToAttrs (nixpkgs.lib.zipListsWith (name: value: { inherit name value; }) names values); + + mkEnumFromDirContents = dir: nixpkgs.lib.types.enum (map (name: nixpkgs.lib.removeSuffix ".nix" name) (builtins.attrNames (builtins.readDir dir))); }; }