Managed with Chezmoi βοΈ β’ Declarative with Nix + Home Manager π€ β’ Themed with Catppuccin π¨
π Overview β’ π Quick Start β’ ποΈ Architecture β’ π§° Tool Stack β’ π Structure β’ βοΈ Configuration
Click to expand
This repository contains my personal dotfiles and system configurations, managed as Infrastructure as Code for maximum reproducibility. A single command bootstraps a fresh Linux installation with all my tools, configurations, and preferences using the power of Chezmoi + Nix Home Manager integration.
| Feature | Description |
|---|---|
| π Reproducible | Same environment on any machine via Nix + Home Manager |
| π§ Universal Linux | Works on Arch, Ubuntu, Debian, Fedora, openSUSE, Alpine, and more |
| π Templated | Machine-specific configs and secrets handled safely via Chezmoi |
| π One Command Setup | Single command setup from fresh install to ready-to-code |
| π¦ Hybrid Management | Chezmoi for dotfiles + Home Manager for packages |
| π¨ Themed | Consistent Catppuccin Mocha across all 40+ tools |
| β‘ Modern CLI | Rust-based replacements for classic Unix tools |
| π Declarative | Nix flakes for reproducible, rollback-able configuration |
| βοΈ Nix Flakes | Modern Nix with flakes enabled by default |
quadrantChart
title Tool Selection Strategy (2025/2026)
x-axis Simple Setup --> Complex Setup
y-axis Low Reproducibility --> High Reproducibility
quadrant-1 Pure Nix
quadrant-2 Home Manager
quadrant-3 Traditional
quadrant-4 Imperative
mise: [0.25, 0.50]
Pacman: [0.15, 0.25]
Paru: [0.20, 0.30]
Nix Flakes: [0.85, 0.95]
Home Manager: [0.70, 0.90]
Chezmoi: [0.40, 0.75]
direnv: [0.55, 0.85]
Chezmoi + HM: [0.60, 0.92]
| # | Principle | Implementation |
|---|---|---|
| 1οΈβ£ | Reproducibility First | Nix + Home Manager ensures byte-for-byte identical environments |
| 2οΈβ£ | Hybrid Management | Chezmoi handles templates/secrets, Home Manager handles packages |
| 3οΈβ£ | Universal Compatibility | Determinate Systems Nix installer works on any Linux distro |
| 4οΈβ£ | Modern Performance | Rust-based tools (starship, atuin, eza, bat, ripgrep) |
| 5οΈβ£ | Minimal Friction | Auto-activation via chezmoi run_onchange scripts |
# π₯ Universal Linux bootstrap - works on ANY distro!
# Arch, Ubuntu, Debian, Fedora, openSUSE, Alpine, WSL2...
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply Yuzu02
# Or with custom options:
curl -fsLS https://raw.githubusercontent.com/Yuzu02/dotfiles/master/install.sh | bash⨠Fully Automatic: Detects your distribution, installs Nix via Determinate Systems installer, sets up Home Manager, and configures everything with a single command!
| Distribution | Package Manager | Nix Support | Status |
|---|---|---|---|
| π΅ Arch Linux | pacman/paru/yay | β | Fully Supported |
| π Ubuntu/Debian | apt-get | β | Fully Supported |
| π΄ Fedora/RHEL | dnf | β | Fully Supported |
| π’ openSUSE | zypper | β | Fully Supported |
| π· Alpine Linux | apk | β | Fully Supported |
| π£ Void Linux | xbps | β | Fully Supported |
| β¬ NixOS | nix | Native | Fully Supported |
| πͺ WSL2 | Any of above | β | Fully Supported |
timeline
title Dotfiles Bootstrap Journey (2025)
section Phase 1 - Detection
System Probe : Detect Linux distribution
: Identify package manager
: Check for WSL/Container
: Determine architecture
section Phase 2 - Foundation
Base Setup : Install curl and git
: Setup sudo if needed
: Create user if root
Nix Install : Determinate Systems installer
: Enable flakes by default
: Configure nix.conf
section Phase 3 - Chezmoi
Dotfiles Init : Install chezmoi binary
: Clone dotfiles repository
: Run pre-apply scripts
Template Apply : Render machine-specific configs
: Copy static files
: Setup XDG directories
section Phase 4 - Home Manager
Nix Build : Parse flake.nix
: Resolve dependencies
: Build derivations
Activation : Install packages
: Generate configs
: Create symlinks
section Phase 5 - Ready
Shell Setup : Configure Zsh
: Enable Starship prompt
: Setup Atuin history
Complete : Modern CLI available
: Catppuccin themed
: Ready to code!
# 1οΈβ£ Install Nix (via Determinate Systems - recommended for 2025)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# 2οΈβ£ Install chezmoi
nix profile install nixpkgs#chezmoi
# 3οΈβ£ Initialize dotfiles
chezmoi init https://github.com/Yuzu02/dotfiles.git
# 4οΈβ£ Preview changes
chezmoi diff
# 5οΈβ£ Apply (triggers Home Manager automatically)
chezmoi apply -vC4Context
title Dotfiles System Architecture - Chezmoi + Nix Integration
Enterprise_Boundary(env, "Development Environment") {
Person(dev, "Developer", "Uses the development environment daily")
System_Boundary(dotfiles, "Dotfiles Management") {
System(chezmoi, "Chezmoi", "Templated dotfile management, secrets handling, cross-machine sync")
System(hm, "Home Manager", "Declarative Nix-based user configuration")
}
System_Boundary(pkgmgmt, "Package Management") {
SystemDb(nixstore, "Nix Store", "Immutable package store with atomic upgrades")
System(mise, "mise", "Polyglot tool version manager")
System(native, "Native PM", "pacman/apt/dnf for system packages")
}
System_Boundary(shell, "Shell Environment") {
System(zsh, "Zsh + Starship", "Modern shell with Rust-powered prompt")
System(tools, "Modern CLI", "eza, bat, ripgrep, fd, fzf, zoxide")
}
}
System_Ext(github, "GitHub", "Source repository for dotfiles")
System_Ext(nixpkgs, "Nixpkgs", "Nix package collection")
System_Ext(determinate, "Determinate Systems", "Nix installer")
Rel(dev, zsh, "Uses daily")
Rel(dev, tools, "Commands")
Rel(chezmoi, github, "Syncs from")
Rel(chezmoi, hm, "Triggers activation")
Rel(hm, nixstore, "Manages packages")
Rel(nixstore, nixpkgs, "Fetches from")
Rel(native, determinate, "Installs Nix via")
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="2")
C4Container
title Container Diagram - Dotfiles Application Stack
Person(user, "Developer", "End user of the dotfiles system")
Container_Boundary(bootstrap, "Bootstrap Layer") {
Container(install, "install.sh", "Bash", "Universal bootstrap script with OS detection")
Container(scripts, "Chezmoi Scripts", "Bash/Tmpl", "Ordered installation scripts run_once_before_*")
}
Container_Boundary(config, "Configuration Layer") {
Container(chezmoi_core, "Chezmoi Core", "Go", "Template rendering, file management, secrets")
Container(templates, "Dotfile Templates", "Go Template", "Machine-specific configs via templating")
ContainerDb(state, "Chezmoi State", "SQLite", "Tracks applied changes and script runs")
}
Container_Boundary(nix_layer, "Nix Layer") {
Container(flake, "flake.nix", "Nix", "Flake-based reproducible configuration")
Container(home_nix, "home.nix", "Nix", "User package and program declarations")
ContainerDb(nix_store, "Nix Store", "Content-addressed", "Immutable package storage")
}
Container_Boundary(shell_layer, "Shell Layer") {
Container(zsh_config, "Zsh Config", "Zsh", "Shell configuration and aliases")
Container(starship, "Starship", "Rust", "Cross-shell prompt with theming")
Container(atuin, "Atuin", "Rust", "Encrypted shell history sync")
}
Rel(user, install, "Runs once")
Rel(install, scripts, "Triggers")
Rel(scripts, chezmoi_core, "Invokes")
Rel(chezmoi_core, templates, "Renders")
Rel(chezmoi_core, state, "Updates")
Rel(chezmoi_core, flake, "Writes to ~/.config/home-manager")
Rel(flake, home_nix, "Imports")
Rel(home_nix, nix_store, "Builds into")
Rel(nix_store, zsh_config, "Provides to")
Rel(zsh_config, starship, "Loads")
Rel(zsh_config, atuin, "Integrates")
architecture-beta
group bootstrap(cloud)[Bootstrap Layer]
group config(cloud)[Configuration Layer]
group packages(cloud)[Package Layer]
group shell(cloud)[Shell Layer]
service install(server)[Install Script] in bootstrap
service scripts(server)[Chezmoi Scripts] in bootstrap
service chezmoi(database)[Chezmoi] in config
service templates(disk)[Templates] in config
service hm(database)[Home Manager] in config
service nix(server)[Nix Store] in packages
service mise(server)[mise] in packages
service native(server)[Native PM] in packages
service zsh(server)[Zsh] in shell
service starship(server)[Starship] in shell
service tools(server)[CLI Tools] in shell
install:R --> L:scripts
scripts:B --> T:chezmoi
chezmoi:R --> L:templates
chezmoi:B --> T:hm
hm:B --> T:nix
nix:R --> L:mise
mise:R --> L:native
nix:B --> T:zsh
zsh:R --> L:starship
starship:R --> L:tools
sequenceDiagram
autonumber
actor User as π€ Developer
participant Install as π install.sh
participant System as π§ Linux System
participant Nix as βοΈ Nix/Home Manager
participant Chezmoi as π Chezmoi
participant HM as π¦ Home Manager
rect rgb(49, 50, 68)
Note over User,HM: Phase 1: System Detection & Bootstrap
User->>Install: curl install.sh | sh
Install->>System: Detect OS (arch/ubuntu/fedora...)
Install->>System: Detect environment (WSL/Container)
System-->>Install: OS info + architecture
Install->>System: Install base dependencies (curl, git)
end
rect rgb(30, 102, 145)
Note over Install,Nix: Phase 2: Nix Installation
Install->>Nix: curl determinate.systems/nix
Nix->>System: Install Nix daemon
Nix->>System: Enable flakes + nix-command
Nix-->>Install: Nix ready
end
rect rgb(137, 180, 250)
Note over Install,Chezmoi: Phase 3: Chezmoi Setup
Install->>Chezmoi: Install chezmoi
Chezmoi->>Chezmoi: chezmoi init Yuzu02/dotfiles
Chezmoi->>System: Run pre-scripts (00-05)
Chezmoi->>System: Apply dotfile templates
Chezmoi->>System: Write ~/.config/home-manager/*
end
rect rgb(166, 227, 161)
Note over Chezmoi,HM: Phase 4: Home Manager Activation
Chezmoi->>HM: Trigger run_onchange script
HM->>Nix: nix run home-manager -- switch
Nix->>Nix: Build flake configuration
Nix->>System: Install packages to Nix store
HM->>System: Activate generation
HM-->>User: Environment ready!
end
rect rgb(203, 166, 247)
Note over User,HM: Daily Usage
User->>Chezmoi: chezmoi update
Chezmoi->>HM: Detect config changes
HM->>Nix: Rebuild if needed
Nix-->>User: Updated environment
end
stateDiagram-v2
direction TB
[*] --> Detect: curl install.sh | sh
state Detect {
direction LR
[*] --> OS_Check
OS_Check --> Arch: /etc/os-release = arch
OS_Check --> Debian: /etc/os-release = debian/ubuntu
OS_Check --> Fedora: /etc/os-release = fedora/rhel
OS_Check --> NixOS: /etc/NIXOS exists
OS_Check --> Other: Unknown distro
Arch --> PKG_Ready
Debian --> PKG_Ready
Fedora --> PKG_Ready
NixOS --> NIX_Ready
Other --> PKG_Ready
PKG_Ready --> [*]
NIX_Ready --> [*]
}
Detect --> BaseDeps: Install base packages
state BaseDeps {
direction LR
[*] --> curl_git
curl_git --> build_tools
build_tools --> [*]
}
BaseDeps --> NixInstall: Determinate Systems installer
state NixInstall {
direction LR
[*] --> check_existing
check_existing --> skip: Nix found
check_existing --> install: Not found
install --> enable_flakes
skip --> [*]
enable_flakes --> [*]
}
NixInstall --> ChezmoiSetup
state ChezmoiSetup {
direction LR
[*] --> install_chezmoi
install_chezmoi --> init_repo
init_repo --> apply_templates
apply_templates --> [*]
}
ChezmoiSetup --> HomeManager
state HomeManager {
direction LR
[*] --> build_config
build_config --> activate
activate --> verify
verify --> [*]
}
HomeManager --> [*]: Environment Ready!
gantt
title Dotfiles Bootstrap Timeline (Estimated Duration)
dateFormat X
axisFormat %s seconds
section Detection
Detect OS :done, detect, 0, 1
Detect WSL :done, wsl, 1, 1
Check Architecture :done, arch, 2, 1
section Base Setup
Install curl/git :active, curl, 3, 3
Sudo Configuration :sudo, after curl, 2
Package Manager Update :pkgupd, after sudo, 5
section Nix Installation
Download Installer :nixdl, after pkgupd, 3
Install Nix Daemon :nixinst, after nixdl, 15
Enable Flakes :flakes, after nixinst, 2
section Chezmoi Setup
Install Chezmoi :cz, after flakes, 3
Clone Repository :clone, after cz, 5
Run Pre-Scripts :scripts, after clone, 20
Apply Templates :apply, after scripts, 5
section Home Manager
Initial Build :crit, hmbuild, after apply, 60
Package Installation :crit, hmpkgs, after hmbuild, 30
Activation :hmact, after hmpkgs, 5
section Finalization
Shell Configuration :shell, after hmact, 3
Verification :verify, after shell, 2
Ready :milestone, done, after verify, 0
| Layer | Tool | Purpose | Why This Choice? |
|---|---|---|---|
| Installer | Determinate Systems | Nix installation | Works on any distro, SELinux compatible, better uninstall |
| Dotfiles | chezmoi |
Config management | Templates, secrets, one-command deploy |
| Packages | Home Manager |
Declarative packages | Reproducible, rollbacks, Catppuccin integration |
| Dev Tools | mise |
Runtime management | 15x faster than asdf (Rust vs Bash) |
| Shell | zsh + starship |
Interactive shell | POSIX compatible, fastest prompt (Rust) |
| History | atuin |
Shell history | Encrypted sync, fuzzy search |
pie showData
title Package Management Distribution (2025)
"Nix/Home Manager" : 45
"Native PM (Arch/Apt/Dnf)" : 20
"mise (Dev Runtimes)" : 20
"Chezmoi (Config Files)" : 15
π Shell & Navigation
| Tool | Replaces | Description |
|---|---|---|
zsh |
bash | Primary shell with Oh My Zsh |
starship |
PS1 | Cross-shell prompt (Rust) |
atuin |
history | Shell history sync & search |
zoxide |
cd | Smart directory jumping |
fzf |
- | Fuzzy finder |
carapace |
completions | Universal shell completions |
π File Operations
| Tool | Replaces | Description |
|---|---|---|
eza |
ls | Modern listing with icons |
bat |
cat | Syntax highlighting |
ripgrep |
grep | 10x faster search |
fd |
find | User-friendly find |
yazi |
ranger | Terminal file manager |
dust |
du | Visual disk usage |
duf |
df | Beautiful disk free |
π§ Development
| Tool | Purpose | Description |
|---|---|---|
mise |
Runtimes | Tool version manager |
neovim |
Editor | Modal text editor |
lazygit |
Git | Git TUI |
delta |
Diff | Git diff viewer |
direnv |
Env | Auto-load environments |
π₯οΈ System & Monitoring
| Tool | Replaces | Description |
|---|---|---|
btop |
top | System monitor |
procs |
ps | Process viewer |
zellij |
tmux | Terminal multiplexer |
fastfetch |
neofetch | System info |
π¦ Languages (via mise)
| Runtime | Description |
|---|---|
bun |
JavaScript runtime & toolkit |
node |
Node.js LTS |
uv |
Python package manager |
π¦ dotfiles/
βββ π install.sh # Bootstrap script
βββ π README.md # This file
βββ π .chezmoiroot # Points to home/
β
βββ π home/ # Source directory
βββ βοΈ .chezmoi.toml.tmpl # Chezmoi config template
βββ π« .chezmoiignore # Ignored files
β
βββ π .chezmoiscripts/ # Install scripts
β βββ 00-setup-arch-fresh.sh.tmpl
β βββ 01-install-dependencies.sh.tmpl
β βββ 02-install-nix.sh.tmpl
β βββ 03-install-shell-tools.sh.tmpl
β βββ 04-install-modern-cli.sh.tmpl
β βββ 05-install-dev-tools.sh.tmpl
β
βββ π dot_zshrc.tmpl # Zsh configuration
βββ π dot_gitconfig.tmpl # Git configuration
β
βββ π dot_config/ # ~/.config/
βββ π atuin/ # Shell history
βββ π bat/ # Cat replacement
βββ π btop/ # System monitor
βββ π fastfetch/ # System info
βββ π home-manager/ # Nix Home Manager
β βββ flake.nix
β βββ home.nix
β βββ home-minimal.nix
βββ π mise/ # Dev tool manager
βββ π nushell/ # Modern shell
βββ π starship/ # Prompt
βββ π zellij/ # Multiplexer
| Source (chezmoi) | Target (system) | Description |
|---|---|---|
dot_zshrc.tmpl |
~/.zshrc |
Zsh with templating |
dot_gitconfig.tmpl |
~/.gitconfig |
Git config (WSL-aware) |
dot_config/starship/ |
~/.config/starship/ |
Starship prompt |
dot_config/atuin/ |
~/.config/atuin/ |
Shell history sync |
dot_config/zellij/ |
~/.config/zellij/ |
Terminal multiplexer |
dot_config/nushell/ |
~/.config/nushell/ |
Nushell config |
dot_config/bat/ |
~/.config/bat/ |
Bat configuration |
dot_config/btop/ |
~/.config/btop/ |
System monitor |
dot_config/fastfetch/ |
~/.config/fastfetch/ |
System info |
dot_config/mise/ |
~/.config/mise/ |
Dev tool manager |
dot_config/home-manager/ |
~/.config/home-manager/ |
Nix Home Manager |
When running chezmoi init, you'll be prompted for:
| Variable | Description | Example |
|---|---|---|
name |
Your full name | Yuzu |
email |
Your email | yuzu@example.com |
github_user |
GitHub username | Yuzu02 |
Chezmoi automatically detects:
| Environment | Detection Method | Effect |
|---|---|---|
| WSL | Kernel version contains "microsoft" | Windows clipboard, paths |
| Codespaces | CODESPACES env var |
Minimal install mode |
| DevContainer | REMOTE_CONTAINERS env var |
Minimal install mode |
| Root User | id -u equals 0 |
Skip sudo, install it first |
All tools are configured with the Catppuccin Mocha color scheme:
| Element | Color | Hex |
|---|---|---|
| π« Background | Crust | #11111b |
| β¬ Surface | Base | #1e1e2e |
| β¬ Foreground | Text | #cdd6f4 |
| π΄ Red | Red | #f38ba8 |
| π’ Green | Green | #a6e3a1 |
| π‘ Yellow | Yellow | #f9e2af |
| π΅ Blue | Blue | #89b4fa |
| π£ Mauve | Mauve | #cba6f7 |
π Zsh (with fzf)
| Keybinding | Action |
|---|---|
Ctrl+R |
History search (atuin) |
Ctrl+T |
File fuzzy finder |
Alt+C |
Directory fuzzy finder |
Ctrl+/ |
Toggle preview |
π₯οΈ Zellij
| Keybinding | Action |
|---|---|
Ctrl+G |
Lock/Unlock mode |
Ctrl+P |
Pane mode |
Ctrl+T |
Tab mode |
Ctrl+N |
Resize mode |
Ctrl+H |
Move mode |
Ctrl+S |
Scroll mode |
Ctrl+O |
Session mode |
Ctrl+Q |
Quit |
π Git Aliases
| Alias | Command |
|---|---|
gs |
git status -sb |
gaa |
git add --all |
gcm |
git commit -m |
gp |
git push |
gpl |
git pull |
gl |
git log --oneline --graph |
lg |
lazygit |
# π₯ Update dotfiles from remote
chezmoi update
# βοΈ Edit a dotfile
chezmoi edit ~/.zshrc
# π See what would change
chezmoi diff
# β
Apply changes
chezmoi apply
# β Add a new file to chezmoi
chezmoi add ~/.config/new-tool/config
# π Re-run install scripts
chezmoi state delete-bucket --bucket=scriptState
chezmoi apply# Full system update
paru -Syu # System packages
mise upgrade # Dev tools
chezmoi update # Dotfiles
home-manager switch # Nix packages
# Cleanup
paru -Sc # Package cache
paru -Rns $(paru -Qtdq) # Orphans
nix-collect-garbage -d # Nix store# Dotfiles (auto-backed up)
chezmoi cd && git push
# Export tool lists
mise ls > ~/mise-tools.txt
pacman -Qqe > ~/pacman-packages.txtπ« "sudo: command not found" on fresh install
This is expected on fresh Linux installations. The scripts now handle this automatically by:
- Detecting if running as root
- Detecting your Linux distribution
- Installing sudo and build tools using the appropriate package manager
- Configuring the wheel (Arch/Fedora) or sudo (Ubuntu) group
If you still encounter issues:
Arch Linux:
# As root
pacman -S sudo base-devel
echo "%wheel ALL=(ALL:ALL) ALL" > /etc/sudoers.d/wheelUbuntu/Debian:
# As root
apt-get update && apt-get install -y sudo
usermod -aG sudo your_usernameFedora/RHEL:
# As root
dnf install -y sudo
usermod -aG wheel your_usernameπ¦ Package not found on my distro
Some packages have different names across distributions:
| Tool | Arch | Ubuntu/Debian | Fedora |
|---|---|---|---|
| fd | fd | fd-find | fd-find |
| bat | bat | bat | bat |
| carapace | carapace | (install from GitHub) | (install from copr) |
| eza | eza | (cargo install) | eza |
The scripts handle these differences automatically. If a package fails:
# Check what failed
journalctl -xe
# Install manually
cargo install <package> # For Rust toolsπ mise not activating
# Verify in ~/.zshrc
grep "mise activate" ~/.zshrc
# Should show:
# eval "$(mise activate zsh)"
# Re-source
source ~/.zshrc
# Test
mise doctorβοΈ Nix Flake issues
# Git must track flake.nix
git add flake.nix
# Clear cache
rm -rf ~/.cache/nix
# Check flake
nix flake checkπ Slow shell startup
# Profile startup time
time zsh -i -c exit
# Profile in detail
zsh -xv &> zsh_profile.logInspired by:
| Project | Inspiration |
|---|---|
| twpayne/dotfiles | Chezmoi author's dotfiles |
| budimanjojo/nix-config | NixOS + Chezmoi structure |
| Catppuccin | Beautiful color scheme |
MIT License - Feel free to use and modify!