This repo defines my user environment via Home
Manager.
It works on Ubuntu (WSL2) with flakes enabled.
-
Install Nix (multi-user, with flakes):
sh <(curl -L https://nixos.org/nix/install) --daemon echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
-
Clone repo into Home Manager config dir:
git clone https://github.com/pkuehne/dotfiles.git ~/.config/home-manager -
Install Home Manager:
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --update nix-shell '<home-manager>' -A install -
Activate (choose profile):
home-manager switch --flake ~/.config/home-manager#home # or home-manager switch --flake ~/.config/home-manager#work
-
Set Zsh as login shell:
echo "$HOME/.nix-profile/bin/zsh" | sudo tee -a /etc/shells chsh -s "$HOME/.nix-profile/bin/zsh"
-
Restart WSL / shell:
exec zsh -l
flake.nix # Entrypoint, defines profiles (home, work)
flake.lock # Version pins (commit to repo!)
modules/
common.nix # Shared config (packages, basics)
zsh.nix # Zsh setup (plugins, aliases)
p10k.nix # Powerlevel10k config (theme, prompt)
work.nix # Work-only overrides (no secrets!)
- Secrets are not in this repo (
.ssh/config, proxies, corp repos, etc.). - Profiles:
home= personal configwork= minimal safe config for corp machines
- Fonts: use a Nerd Font (e.g. FiraCode NF) in your terminal for
Powerlevel10k glyphs.
~/.nix-profile.
Update inputs (nixpkgs, home-manager):
nix flake update
home-manager switch --flake ~/.config/home-manager#home-
If
home-managercommand is missing:nix run github:nix-community/home-manager/release-<version> -- switch --flake ~/.config/home-manager#home
-
If Zsh doesn't start automatically in WSL, set the shell in Windows Terminal profile:
Command line: wsl.exe -d <DistroName> -- zsh