Setting up your macos for development with Nix (nix-darwin)
-
Install nix if you are using MacOs
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
Or go through yourhttps://nix.dev/tutorials/install-nix
to find your OS.
-
Install nix-darwin and setup
https://github.com/LnL7/nix-darwin
-
Home Manager provides a module that allows you to prepare user environments directly from the nix-darwin configuration file.
- Execute these in order.
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
- Execute these in order.
If you need more info on how to configure home-manager with nix-darwin
https://rycee.gitlab.io/home-manager/index.html#sec-install-nix-darwin-module
-
Default setup uses nvim-lspconfig with autocompleteion nvim-comp,
-
To setup nvim with coc change on neovim.nix this
#LSP choices #coc-nvim nvim-lspconfig
to
#LSP choices coc-nvim #nvim-lspconfig
copy
nvim-config/coc-settings.json
to~/.config/nvim/
OR type
:CocConfig
and paste the contents of you coc-settings.json
- To build the configuration run
darwin-rebuild switch