nix-darwin
                                
                                 nix-darwin copied to clipboard
                                
                                    nix-darwin copied to clipboard
                            
                            
                            
                        Uninstall fails on fresh install
Testing nix-darwin and now trying to uninstall via
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar
.gz -A uninstaller
And getting this error:
error:
       … while calling the 'import' builtin
         at /nix/store/9b3h7kfb7crgz84xpvzvwx85gcbfhy8x-source/default.nix:4:10:
            3| , lib ? pkgs.lib
            4| , pkgs ? import nixpkgs { inherit system; }
             |          ^
            5| , system ? builtins.currentSystem
       … while calling the 'findFile' builtin
         at /nix/store/9b3h7kfb7crgz84xpvzvwx85gcbfhy8x-source/default.nix:1:13:
            1| { nixpkgs ? <nixpkgs>
             |             ^
            2| , configuration ? <darwin-config>
       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
       at «none»:0: (source not available)
Try this instead:
$ nix --extra-experimental-features "nix-command flakes" run nix-darwin#darwin-uninstaller
I just had the same issue. Except, not a fresh install. I was using it for a while and something broke. The same uninstall command wouldn't work for me.
This one does..