In nix flake, how to track nixos-unstable?

I saw someone mentioning nixFlakes on IRC and thought I would try it out even though I had otherwise limited interest.
So here I am trying to install packages from nixos-unstable but don’t know how.

$ nix run nixpkgs:ghc works fine since it appears in https://github.com/NixOS/flake-registry and nix flake list.
$ nix run nixos-unstable:ghc won’t work. I thought of adding nixos-unstable but it doesn’t contain a flake.nix (I just read through https://gist.github.com/edolstra/40da6e3a4d4ee8fd019395365e0772e7).

How can I use nixos-unstable then (if that’s already possible)

You can’t at the moment. The nixpkgs flake is actually a temporary fork of NixOS/nixpkgs that contains a flake.nix file, which the upstream repo doesn’t have yet.

1 Like