LnL7 / nix-darwin

nix modules for darwin
MIT License
2.82k stars 431 forks source link

Add a uninstaller for flakes #918

Closed bernes1 closed 1 month ago

bernes1 commented 6 months ago

add this comand for uninstaller if you are using flakes becuase the other uninstaller dont work if you are using flakes

https://github.com/LnL7/nix-darwin/issues/853#issuecomment-1897541986

OJFord commented 5 months ago

I needed this even with the non-flake installation. I think the issue is that the readme flake/non-flake is about how nix-darwin is installed, but the non-flake uninstallation section still assumes nix is configured to support flakes.

Enzime commented 5 months ago

https://github.com/LnL7/nix-darwin?tab=readme-ov-file#uninstalling

I don't think this command should require flakes

bernes1 commented 5 months ago

the unistaller in the readme did not work with my flake setup

noghartt commented 4 months ago

Any update on that? I having an issue with the uninstaller too into my flake setup

$NIX_PATH won't be set into macOS with flake


nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstaller
error:
       … while calling the 'import' builtin

         at /nix/store/v644prfh8sbnr9fx4kzisrpmixl07yss-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/v644prfh8sbnr9fx4kzisrpmixl07yss-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)
``
foxmean commented 1 month ago

Any update on that? I having an issue with the uninstaller too into my flake setup

$NIX_PATH won't be set into macOS with flake

nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstaller
error:
       … while calling the 'import' builtin

         at /nix/store/v644prfh8sbnr9fx4kzisrpmixl07yss-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/v644prfh8sbnr9fx4kzisrpmixl07yss-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)
``

I have exactly the same error