https://github.com/expelledboy/dotfiles
A pragmatic dotfiles manager that combines GNU Stow simplicity with Nix reproducibility for the best of both worlds
https://github.com/expelledboy/dotfiles
configuration-management dotfiles git-crypt home-manager justfile macos nix nix-darwin reproducible-environments stow
Last synced: about 1 month ago
JSON representation
A pragmatic dotfiles manager that combines GNU Stow simplicity with Nix reproducibility for the best of both worlds
- Host: GitHub
- URL: https://github.com/expelledboy/dotfiles
- Owner: expelledboy
- Created: 2021-08-13T18:57:08.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T19:24:55.000Z (7 months ago)
- Last Synced: 2025-03-01T20:29:57.806Z (7 months ago)
- Topics: configuration-management, dotfiles, git-crypt, home-manager, justfile, macos, nix, nix-darwin, reproducible-environments, stow
- Language: Nix
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotfiles: The Best of Both Worlds
A hybrid approach to managing configurations that combines the simplicity of GNU
Stow with the power of Nix declarative configuration.## Why This Approach?
Traditional dotfiles management presents a dilemma:
- **Pure symlink management** (Stow) is simple but can't handle dependencies
- **Pure declarative configuration** (Nix) is powerful but complex for simple filesThis system takes the best of both worlds:
- **Stow** for what it does best: transparent file management
- **Nix** for what it does best: reproducible environments
- **Automation** to tie it all together seamlessly## How It Works
- **Directory Structure**: Each top-level directory is a stow package (e.g., `nvim/`, `kitty/`)
- **Configuration**: Config files are stored in their natural paths within each package
- **Integration**: Each package can have a `home.nix` for declarative dependencies
- **Environment**: `.env.user` and `.env.config` define paths and preferences
- **Security**: `git-crypt` encrypts sensitive files in the `secrets/` directory
- **Automation**: `justfile` provides a unified command interface for all operations## Workflows
### Setup
- `just restore [hostname]` - Complete machine setup (hostname, Nix rebuild, stow config, Homebrew)
### Daily Use
- `just save` - Capture and commit all configuration changes
- `just configure [pkg]` - Install specific package config
- `just rebuild` - Apply Nix system changes### Extending
- `just stow [pkg] [path]` - Lift an existing config file into a stow package
- `just stow-nix-file [pkg] [path]` - Lift a Nix-managed file into a stow package
- `just update-brewfile` - Update Homebrew package list### Security
- `just lock-vault` - Encrypt sensitive files
- `just unlock-vault` - Decrypt for editing## Key Benefits
- **Progressive adoption**: Start simple, add complexity only where needed
- **Self-documenting**: Directory structure documents what's configured
- **Future-proof**: Nix provides reproducibility, Stow provides simplicity
- **Flexible**: Works for both quick configs and complex environments