Skip to content

My dotfiles - managed by chezmoi

Notifications You must be signed in to change notification settings

pkuehne/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles (Nix + Home Manager)

This repo defines my user environment via Home Manager.
It works on Ubuntu (WSL2) with flakes enabled.


Quickstart (new machine)

  1. 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
  2. Clone repo into Home Manager config dir:

    git clone https://github.com/pkuehne/dotfiles.git ~/.config/home-manager
  3. 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
  4. Activate (choose profile):

    home-manager switch --flake ~/.config/home-manager#home
    # or
    home-manager switch --flake ~/.config/home-manager#work
  5. Set Zsh as login shell:

    echo "$HOME/.nix-profile/bin/zsh" | sudo tee -a /etc/shells
    chsh -s "$HOME/.nix-profile/bin/zsh"
  6. Restart WSL / shell:

    exec zsh -l

Layout

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!)

Notes

  • Secrets are not in this repo (.ssh/config, proxies, corp repos, etc.).
  • Profiles:
    • home = personal config
    • work = minimal safe config for corp machines
  • Fonts: use a Nerd Font (e.g. FiraCode NF) in your terminal for Powerlevel10k glyphs. ~/.nix-profile.

Updating

Update inputs (nixpkgs, home-manager):

nix flake update
home-manager switch --flake ~/.config/home-manager#home

Troubleshooting

  • If home-manager command 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
    

About

My dotfiles - managed by chezmoi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published