Experimental Commands: error: bad optional access

Hey there,

when using any experimental nix command like nix flake or nix develop I get following error message: error: bad optional access. This happened on a fresh install of nix on my laptop (pop!_os).


experimental-features = nix-command flakes
build-users-group = nixbld

I know that nix commands are experimental, but I’d still appreciate any help.


  • Framework 13" Laptop (12th Gen)
  • CPU: 12th Gen Intel i7-1260P
  • pop!_os (Linux Kernel 6.6.10)
  • DE: Gnome 42.5

I actually found the solution for my problem: I haven’t commited my project changes to git, which caused this issue.