This commit is contained in:
Yaro Kasear 2025-11-28 15:52:15 -06:00
parent ee31bfb7f6
commit 633a9c1856
12 changed files with 1308 additions and 1210 deletions

View file

@ -1,9 +0,0 @@
{ data, lib }:
let
mkLocationsList = locations: builtins.attrNames locations;
mkLocationIndex = data: location: lib.lists.findFirstIndex (x: x == location) null (mkLocationsList data);
in
{
inherit mkLocationsList mkLocationIndex;
}

View file

@ -1,12 +0,0 @@
{ data, lib }:
let
indexOf = name: names:
let
indexed = builtins.imap0 (i: v: { inherit i v; }) names;
matches = builtins.filter (x: x.v == name) indexed;
in
if matches == [ ] then null else (builtins.head matches).i;
in
{ indexOf = indexOf; }