How to Export Your Nix Home Manager Config to ConfigSync
Nix gives you reproducibility. ConfigSync gives you simplicity. Here's how to make the switch — and when a hybrid approach makes sense.
Why Some Developers Leave Nix
Nix and Home Manager are powerful. Declaratively specifying your entire environment in a functional language, getting hash-level reproducibility, rolling back to any generation — the pitch is compelling. But the reality often involves weeks of learning the Nix language, debugging cryptic evaluation errors, and waiting for large closures to build.
Common reasons developers move on:
- Steep learning curve — the Nix language is unlike anything else in the ecosystem
- Slow evaluation — rebuilding your Home Manager config can take minutes, even for small changes
- Large closures — Nix store paths grow quickly; a typical Home Manager setup can consume gigabytes
- Debugging difficulty — error messages are often unhelpful, and tracing issues through the module system is painful
- Ecosystem friction — not every tool plays nicely with Nix-managed configs, especially GUI applications
What You Keep and What You Lose
When you leave Nix Home Manager, you keep every config file it generated. These are real files on disk — ~/.gitconfig, ~/.config/nvim/init.lua, ~/.zshrc. They just happen to be symlinks into the Nix store.
What you give up is declarative reproducibility at the hash level. Nix guarantees that the same inputs produce the same outputs, byte-for-byte. ConfigSync does not make that guarantee — it syncs your actual config files as they are, encrypted, across machines.
For most developers, this is a worthwhile trade. You get simplicity and encrypted cloud sync in exchange for a theoretical purity that rarely matters in practice for dotfile management.
Step-by-Step Migration
1. Identify your Home Manager outputs
Home Manager creates symlinks from standard config paths to the Nix store. Start by finding what it manages:
# List all symlinks Home Manager created
find ~ -maxdepth 3 -type l -lname '/nix/store/*' 2>/dev/null
# Common locations to check
ls -la ~/.config/git/config
ls -la ~/.config/nvim/
ls -la ~/.zshrc
ls -la ~/.ssh/config
2. Copy generated configs to their normal locations
Replace each Nix store symlink with the actual file content:
# Resolve symlinks and copy the real files
cp $(readlink ~/.config/git/config) ~/.gitconfig
cp -rL ~/.config/nvim ~/.config/nvim-real
rm -rf ~/.config/nvim && mv ~/.config/nvim-real ~/.config/nvim
# For zshrc
cp $(readlink ~/.zshrc) ~/.zshrc.real
mv ~/.zshrc.real ~/.zshrc
3. Add modules and configs to ConfigSync
# Add modules for tools Home Manager was configuring
configsync add module git
configsync add module ssh
configsync add module zsh
configsync add module neovim
configsync add module vscode
# Add any remaining config files
configsync add config ~/.config/starship.toml
configsync add config ~/.config/alacritty/alacritty.toml
4. Capture your package list
Home Manager managed packages through Nix. Now you need to track them through your native package manager:
# Install packages via Homebrew/apt that Nix was providing
# Then let ConfigSync capture the list
configsync scan
If you kept a list of home.packages in your Home Manager config, use that as a reference for what to install through Homebrew or apt before scanning.
5. Migrate environment variables
Home Manager often sets environment variables through home.sessionVariables. Move these to ConfigSync:
# For non-secret env vars, add them to your shell config
# ConfigSync will sync your .zshrc / .bashrc automatically
# For secrets, use ConfigSync's secret management
configsync secret set GITHUB_TOKEN ghp_xxxxxxxxxxxx
configsync add env-var EDITOR nvim
6. Push your configuration
configsync push
The Tradeoff
| Aspect | Nix Home Manager | ConfigSync |
|---|---|---|
| Reproducibility | Hash-level, byte-for-byte | File-level sync |
| Learning curve | Weeks to months | Minutes |
| Setup time (new machine) | Hours (with Nix install + build) | 5 minutes |
| Encryption | None built-in | AES-256-GCM |
| Cloud sync | Via git (unencrypted) | Built-in encrypted cloud |
| Secret management | sops-nix or agenix | Built-in (4 providers) |
| Config language | Nix (functional) | None required |
| Rollback | Nix generations | Snapshot history |
| Disk usage | Gigabytes (Nix store) | Megabytes |
Nix's strength is theoretical purity: the same expression always produces the same result. In practice, for dotfile management, this level of reproducibility is rarely needed. You do not need hash-level guarantees that your .gitconfig is identical — you need it to be correct and available on all your machines.
The Hybrid Approach
You do not have to go all-or-nothing. Many developers find a middle ground works best:
- Keep Nix for system-level packages and development shells (
nix developfor per-project toolchains) - Use ConfigSync for dotfiles, secrets, and cross-machine sync
This gives you Nix's reproducible development environments where it matters (project-level tooling) without the complexity of managing your entire home directory through Home Manager.
# Nix handles project-level tooling
cd ~/projects/my-app && nix develop
# ConfigSync handles everything else
configsync pull # dotfiles, secrets, packages
configsync watch # keep it all in sync
What You Gain
After migrating, the day-to-day experience changes dramatically:
- 5-minute setup instead of hours installing Nix and building your config on a new machine
- Instant config changes — edit a file and it syncs, no
home-manager switchrebuild needed - Encrypted cloud sync — your secrets are protected, not sitting in a git repo or Nix expression
- Native package managers — Homebrew and apt packages install in seconds, not minutes through Nix
- Zero Nix language required — new team members can understand your setup immediately
Nix Home Manager is an impressive piece of engineering. But for most developers, the complexity cost does not justify the benefits when it comes to dotfile management. ConfigSync gives you encrypted sync, secret management, and cross-machine consistency — with a fraction of the cognitive overhead.
Ready to try ConfigSync?
Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.