Template for nix configuration for darwin and linux together
-
Fork it to your private(!!!) repository.
-
Install nix
#Linux sh <(curl -L https://nixos.org/nix/install) --daemon #macOS sh <(curl -L https://nixos.org/nix/install)
-
Add experimental features to work with flakes
mkdir -p ~/.config/nix echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
-
Clone your repository to your machine
git clone https://github.com/your-username/your-config.git ~/.config/home-manager cd ~/.config/home-manager
-
First time apply config
#Linux nix run home-manager/master -- switch --flake .#linux-username #macOS nix run home-manager/master -- switch --flake .#darwin-username
-
Any other time after updating config
home-manager switch --flake .#your-hostname