Personal dotfiles, managed in three layers:
- Nix (
nix/): system configuration and packages, pinned byflake.lockand applied with a rebuild. Fully reproducible. - Stow (
stow/): dotfiles symlinked into$HOMEwith GNU Stow (not Nix). Changes take effect immediately, no rebuild needed. - Kaizen (
kaizen/): my custom Linux desktop experience, a Quickshell shell for niri or umbriel.
- Neovim ⌨️
- My config
- Minimalistic config - for when a full blown IDE is too much; inspired by NativeVim and Sylvan Franklin's config
- Workflows 🌊
- Styling 🎨
-
Install either... a. NixOS, with the user
fredrikb. macOS + Homebrew + nix-darwin -
Set
hostnameto a host undernix/hosts/ -
Clone this repo into
~/.dotfiles; on a fresh NixOS, git comes fromnix-shell -p git -
NixOS: copy the installer's
/etc/nixos/hardware-configuration.nixovernix/hosts/<host>/hardware-configuration.nix, which holds the old install's filesystem UUIDs -
Rebuild; a host with a submodule adds
?submodules=1:# NixOS sudo nixos-rebuild switch --flake ~/.dotfiles#"$(hostname -s)" # for hosts with private submodules sudo nixos-rebuild switch --flake "$HOME/.dotfiles?submodules=1#wily" # macOS sudo darwin-rebuild switch --flake ~/.dotfiles#"$(hostname -s)"
The rebuild stows the dotfiles, so stow.sh needs no separate run. On a
machine without Nix, ~/.dotfiles/stow.sh links the dotfiles alone.
Then, after the first rebuild, some common commands:
# rebuild and switch using nh
nh os switch --ask # NixOS
nh darwin switch --ask # macOS
# run stowing of files
~/.dotfiles/stow.sh
# update all flake inputs
nix flake update
# update only specific input
nix flake update llm-agents # example
# clean up old generations
sudo nix-collect-garbage --delete-older-than 5d
# update homebrew packages on macOS
brew update && brew upgrade # add --greedy to also bump self-updating casksNote
Pinning Homebrew versions is possible via nix-homebrew with locked taps, but it buys little here: casks that self-update ignore the pin, vendors delete old cask artifacts, and Mac App Store apps cannot be pinned at all.
