- Root of this repository is the root of my home directory.
- This is done using a bare git repository, which sets the working directory to the home folder, and git directory to
~/.dotfiles
. - Using
showUntrackedFiles=false
, only tracked files will be visible in git commands for the dotfiles.
- This is done using a bare git repository, which sets the working directory to the home folder, and git directory to
- A flake for nix-darwin is placed under
~/nix-config
.- This is used for configuring my MacOS system, homebrew and nixpkgs.
- home-manager was too blackbox for my taste, as I prefer to edit my dotfiles directly.
Quick Start
- Install
git
the "apple-way".
xcode-select --install
- Install Nix using the determinate system installer.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
- Clone this repository to root of home directory.
git clone --bare https://github.com/frealmyr/dotfiles.git $HOME/.dotfiles/
alias dtf='git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" "$@"'
dtf config status.showUntrackedFiles no
dtf status
- Build and use the flake for nix-darwin.
nix run nix-darwin -- switch --flake ~/nix-config
- Reboot for good measure.
How to iterate?
Dotfiles can be added to git using a alias:
alias dtf='git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" "$@"'
dtf status
dtf add ~/.config/something.conf
dtf commit -m "punny msg"
dtf push -u origin macos
Changes made to Nix-darwin flake, can be rolled out using this command:
darwin-rebuild switch --flake ~/nix-config