I’m trying to follow the docs at Flakes - NixOS Wiki
Tried permanently enabling flakes by adding:
nix.settings.experimental-features = [ "nix-command" "flakes" ];
in /etc/nixos/configuration.nix .
Restarted afterwards (this is in a VM btw).
More context in the config file:
nix.settings.experimental-features = [ "nix-command" "flakes" ];
Yet, when I run nix flake init (or sudo nix flake init):
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
Edit: Got it to work! I still would like to know how to make it work permanently (suspect I may just need to specify extra in the config), but it’s working for one offs with:
nix --extra-experimental-features 'nix-command flakes' run github:Name/Subname