3 ms·
I use Nix[1] as my package manager on macOS with home-manager[2]. Since Nix puts nix paths before OS paths and doesn't prefix GNU commands with 'g', I just inst
by danieldk 8y ago
I use Nix[1] as my package manager on macOS with home-manager[2]. Since Nix puts nix paths before OS paths and doesn't prefix GNU commands with 'g', I just install coreutils and others:
https://github.com/danieldk/nix-home/blob/a7ddc5acf260552f737700795252905ca64f4214/machines/macbook.nix#L20 https://github.com/danieldk/nix-home/blob/a7ddc5acf260552f73...
The nice thing is that the system state is never mutated, you can just remove these lines from the configuration, run home-manager switch and you are back to the standard macOS userland.
You could also only use GNU userland in specific projects by putting a default.nix file in the project's directory and using dirvenv. cd to myproject and you have a GNU userland, cd out of myproject and you are back to the macOS userland.
[1] https://nixos.org/nix/ https://nixos.org/nix/
[2] https://github.com/rycee/home-manager https://github.com/rycee/home-manager