My personal macOS and NixOS config
Clients
- boook (macOS): Macbook Pro M1Pro. Standalone Home-Manager with Homebrew for casks
- fork (NixOS): Framework 13 Ryzen AI 300. Full NixOS system with Home-Manager
Install steps
macOS (boook)
- Install nix using the Determinate Nix Installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Restart the shell after installation
- Add nix-community cache
nix run nixpkgs#cachix -- use nix-community
- Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Disable analytics /opt/homebrew/bin/brew analytics off
- Clone config
git clone git@github.com:okkdev/dotnix.git
- Symlink config
mkdir ~/.config ln -s (pwd)/dotnix ~/.config/home-manager
- Activate config
nix run home-manager -- switch
🚨 Fish needs to be added to /etc/shells manually:
echo $HOME/.nix-profile/bin/fish | sudo tee -a /etc/shells chsh -s $HOME/.nix-profile/bin/fish
NixOS (fork)
-
Install NixOS using the standard installer
-
Clone config
git clone git@github.com:okkdev/dotnix.git
cd dotnix- Build and activate
sudo nixos-rebuild switch --flake '.#fork'Apply new config
macOS
home-manager switch # or nsw # alias defined in config
NixOS
sudo nixos-rebuild switch --flake '.#fork' # or nsw # alias defined in config
Update packages
nix flake update home-manager switch
Troubleshooting
Too many open files (macOS)
sudo launchctl limit maxfiles 1024 unlimited sudo launchctl stop org.nixos.nix-daemon sudo launchctl start org.nixos.nix-daemon
Too many open files (NixOS)
Then retry your build command.