Conventions for easier discovery of Nix Flake repositories?

I don’t really know if this has been discussed before, but maybe we can establish some community conventions for public repositories containing Nix Flakes to facilitate discovery?

For example, it seems that there’s a topic called nix-flake on GitHub, but I feel like the number of repos there (25 at time of writing) is much less than the number of repos containing a flake.nix (or so I would expect). I think it would be much easier to discover than searching for a file called flake.nix on GitHub, albeit requiring action from the repo maintainer to actually add the topic.

I just added this topic to my own personal configuration repo. I also created a section in README.md describing how to use the Flake, along with the output of nix flake show to give whoever is reading a better idea of what it contains. It looks like this:

Nix Flake

This repository contains a Nix Flake. To use it, use the following Flake URL:

github:dramforever/config

Contents of this flake:

$ nix flake show github:dramforever/config
github:dramforever/config/[...]
├───defaultPackage
│   └───x86_64-linux: package 'dram-packages'
├───legacyPackages
│   └───x86_64-linux: omitted (use '--legacy' to show)
├───nixosConfigurations
│   └───sakuya: NixOS configuration
└───overlays: unknown

You can see it here: GitHub - dramforever/config: Random config (v2, clean history)

I am not familiar with other hosting services, but if there’s something like topic on GitHub then it’s going to be great for people browsing for flakes to try out. Even if it’s unavailable or you’re using a self-hosted solution or something, a section like what I’ve written would help whoever finds the repo.

What do you think?

1 Like

I know @edolstra mentioned that they were working on a flake search function for the official nixos.org website.