This repository contains my personal dotfiles, managed using GNU Stow.
Install GNU Stow using Homebrew:
brew install stow
-
Copy your dotfile to the repository:
cp ~/.zshrc .
-
Backup existing dotfile (recommended):
mv ~/.zshrc ~/.zshrc.bak
-
List files in dotfiles directory:
ls -lah
To create symlinks for all dotfiles:
stow .
To adopt existing configuration files:
stow --adopt .
The --adopt
flag is useful when you want to move existing configuration files into your dotfiles repository. When you use --adopt
:
- It will move the existing target file into your dotfiles directory
- Create the appropriate symlink back to the original location
- This is helpful when you want to add existing configurations to version control without manually copying files
https://github.com/LnL7/nix-darwin https://github.com/zhaofengli/nix-homebrew
# Setup
sudo mkdir -p /etc/nix-darwin
sudo chown $(id -nu):$(id -ng) /etc/nix-darwin
cd /etc/nix-darwin
# Configure
nix flake init -t nix-darwin/master --extra-experimental-features "nix-command flakes"
nix run --extra-experimental-features 'nix-command flakes' nix-darwin -- switch --flake .#silvermac
# Verify
which darwin-rebuild
# Rebuild
cd /etc/nix-darwin
darwin-rebuild switch --flake .#silvermac