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 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 · GitHub).

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

just to mention I am now able to use a local checkout of nixos-unstable via nix flake add mine /home/teto/nixpkgs

Looks great. Is it possible to use that flake for a nixos-rebuild?

just as an update, the previous doesn’t work anymore, you should use

nix registry add nixpkgs ~/my-nixpkgs

as per