How to enable recursive nix

How do I enable recursive nix?I tried to build a derivation calling nix inside but I keep getting
error: creating directory '/nix/var': Permission denied
even when I call the top nix build with sudo nix repl ./. --experimental-features recursive-nix --experimental-features nix-command

1 Like