I also suggest looking into prior work: [RFC 0181] List index syntax by rhendric · Pull Request #181 · NixOS/rfcs · GitHub