A usable and practical setup
sh <(curl -L https://nixos.org/nix/install)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
nix shell --extra-experimental-features 'nix-command flakes' nixpkgs#git nixpkgs#vim
git clone https://github.com/SoiKr/darwindots ~/.nixconf
cd ~/.nixconf
~/.nixconf/flake.nix
38. user = "soikr";
39. hostname = "snowmalus";
Warning
Dont forget to set your system hostname and user to this and reboot.
nix --extra-experimental-features "nix-command flakes" build ".#darwinConfigurations.hostname_here.system"
./result/sw/bin/darwin-rebuild switch --flake .
If you already have the nix-darwin binary built:
nix run --extra-experimental-features 'nix-command flakes' nix-darwin -- switch --flake ".#darwinConfigurations.hostname_here.system"
darwin-rebuild switch --flake .
darwin-rebuild switch --flake ~/.
Please reboot after this.
nix flake update # All Inputs
nix flake lock --update-input <input> # Single Input
dr = darwin-rebuild switch --flake ~/.nixconf
ne = "nvim -c ':cd ~/.nixconf' ~/.nixconf";
nsh = "nix-shell";
ns = "nix search nixpkgs";
ngc = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents && nix store optimise";
- Initialize a rustup toolchain. (ie.
rustup toolchain install stable
) - Run discord in the terminal first to patch its settings preventing the helper popup and auto updates.
- If discord does prompt you with the helper popup, ignore it. If you dont, you can fix discord by doing this:
Caution
force removing the nix path that discord lays in with rm -rf
nix-store --verify --check-contents --repair
- Further nixify the config (options, colors, templates, all the stuff i dont wanna set up)
nix-darwin nix-darwin options home-manager options
Code formatted with Alejandra
- You can do this with
nix fmt
breuerfelix's dotfiles for providing a base to learn nix and nix-darwin.
bfpimentel's dotfiles for their sketchybar/aerospace integration setup.