Using experimental Nix features in Nixos, and when they will land in stable

Thanks @takeda. If I add:

  nix.extraOptions = ''experimental-features = nix-command flakes'';

to my NixOS config, it results in warning: unknown setting 'experimental-features' whenever running Nix.

Similarly running nix --experimental-features nix-command dev-shell results in error: unrecognised flag '--experimental-features'.

Running nix --version gives nix (Nix) 2.3.4. Do I need to do something to manually upgrade it past nixpkgs unstable?

Edit: If I install nixFlakes explicitly with nix-shell, I do get access to dev-shell and flakes (but still not nix shell like the blog post). Still not understanding why installing nixFlakes in my NixOS systemPackages didn’t work, do I need to keep it from being overwritten by the default nix command?

3 Likes