Welcome to my nix-home.
The goal for this repo is to declaratively configure MacOS and Linux system using nixos/nix-darwin and home-manger.
feel free to take what you like.
Shell | zsh + starship |
WM | yabai + skhd + sketchybar |
Terminal | Alacritty + tmux |
Editor | Emacs + astronvim + helix |
Shell | zsh + starship |
WM | xmonad + xmobar |
Terminal | Alacritty + tmux |
Editor | Emacs + astronvim + helix |
https://github.com/stars/yuanw/lists/nix-home/
with official script
sh <(curl -L https://nixos.org/nix/install)
or using
https://github.com/DeterminateSystems/nix-installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
edit /etc/nix/nix.conf
experimental-features = nix-command flakes
https://github.com/LnL7/nix-darwin#install
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
there are lots of GUI programs, we cannot install nicely using pure nix. There is brew-module in nix-darwin.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
What is benefits of this ?
we can install/uninstall applications using nix
don’t forget to do
brew analytics off
gpg --list-secret-keys
or gpg --list-secret-keys [email protected]
pub 4096R/ABC12345 2020-01-01 [expires: 2025-12-31]
uid Your Name <[email protected]>
sub 4096R/DEF67890 2020-01-01 [expires: 2025-12-31]
ID of your key (second column e.g “ABC12345”)
gpg --export-secret-keys YOUR_ID_HERE > private.key
font font book
gpg --import private.key
.ssh/config
Host * IgnoreUnknown UseKeychain AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519
nix flake update --recreate-lock-file
nix build .#yuan-mac
./result/sw/bin/darwin-rebuild switch --flake .
darwin-rebuild –rollback
$ nixos-rebuild switch --flake '.#' -user-remote-sudo
sudo chown -R whoami:staff /nix/store
just do pkill yabai
to restart yabai, that always fix the issue for me. I bind skhd key for pkill yabai
and reload skhd
sometime I found I have to sudo yabai --install-sa
sudo yabai --load-sa