This repository contains the NixOS system configurations and Home Manager user environments for my personal machines. It uses Nix Flakes for reproducible builds and efficient dependency management.
To quickly set up a new machine (or an existing one not yet tracking this repo), run the bootstrap script. This will clone the repository, generate hardware configurations, and help apply the system state.
curl -L https://raw.githubusercontent.com/bzvestey/dotfiles/main/bootstrap.sh | bashThe script will prompt you to:
- Apply an Existing Host: If the machine matches a hostname in
hosts/. - Create a New Host: Generates a new host directory with a standard
default.nixandhardware.nixderived from the current system.
If you prefer to set up manually:
- Clone the repo:
git clone https://github.com/bzvestey/dotfiles ~/dev/dotfiles - Generate hardware config:
nixos-generate-config --show-hardware-config > hosts/<new-host>/hardware.nix - Add the host to
flake.nix. - Build:
sudo nixos-rebuild switch --flake .#<host>
This repository includes a justfile to simplify common maintenance tasks. Ensure just is installed (it's included in the devShell).
| Command | Description |
|---|---|
just update |
Updates flake inputs (lockfile) to the latest versions. |
just switch |
Rebuilds and switches to the configuration matching the current hostname. |
just firmware |
Checks for and installs system firmware updates via fwupdmgr. |
just clean |
Garbage collects old generations and optimizes the Nix store. |
Example:
# Update everything and switch
just update && just switchhosts/: Per-machine configurations (entry points).modules/: Reusable NixOS and Home Manager modules.nixos/: System-level configs (hardware, services).home/: User-level configs (programs, dotfiles).
dotfiles/: Raw configuration files managed via Home Manager (e.g., zsh, ssh).pkgs/: Custom packages not found in nixpkgs.flake.nix: The project root, defining inputs and system outputs.
See AGENTS.md for strict guidelines on modifying this repository.