Skip to content

okkdev/dotnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.nix

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)

  1. 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

  1. Add nix-community cache
nix run nixpkgs#cachix -- use nix-community
  1. Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Disable analytics
/opt/homebrew/bin/brew analytics off
  1. Clone config
git clone [email protected]:okkdev/dotnix.git
  1. Symlink config
mkdir ~/.config
ln -s (pwd)/dotnix ~/.config/home-manager
  1. 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)

  1. Install NixOS using the standard installer

  2. Clone config

git clone [email protected]:okkdev/dotnix.git
cd dotnix
  1. 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
brew update
brew upgrade

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)

ulimit -n 4096

Then retry your build command.

About

❄️ nixOS & macOS nix config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published