Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nixos-config

Nix configuration files managed with Home Manager.

Install Nix

macOS / Linux

curl -L https://nixos.org/nix/install | sh

After installation, restart your terminal.

Install Home Manager

Once Nix is installed, register the Home Manager channel:

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager

This adds the Home Manager GitHub repo as a Nix "channel" (a package source URL that Nix can fetch from).

Download the latest snapshot from all registered channels:

nix-channel --update

Run the Home Manager installer:

nix-shell '<home-manager>' -A install

This creates a temporary shell with the Home Manager dependencies, runs the install script, and sets up the home-manager CLI tool.

Usage

This repo includes a ready-to-use home.nix. Before applying, update it with your own username and home directory:

  • macOS: home.homeDirectory = "/Users/your-username";
  • Linux / WSL: home.homeDirectory = "/home/your-username";
home.username = "your-username";
home.homeDirectory = "/Users/your-username";

Then apply:

# Make sure Nix binaries are on PATH first (required in non-login shells)
. "$HOME/.nix-profile/etc/profile.d/nix-daemon.sh" 2>/dev/null || \
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' 2>/dev/null

home-manager switch -f ./home.nix -b backup
  • The source line puts nix-build, nix-env, etc. on PATH — needed if you're running from a shell that didn't load your zsh profile (e.g. a script or IDE terminal)
  • -f points to your custom home.nix instead of the default location (~/.config/home-manager/home.nix)
  • -b backup renames any conflicting files (like .zshrc) with a .backup suffix instead of failing

Modules

zsh.nix

Configures zsh with Oh My Zsh and the following plugins:

Plugin Source Description
fzf Oh My Zsh Fuzzy finder integration
git Oh My Zsh Git aliases and completions
web-search Oh My Zsh Search Google/DuckDuckGo/etc. from terminal
z Oh My Zsh Jump to frequent directories
zsh-autosuggestions nixpkgs Inline command suggestions as you type
zsh-syntax-highlighting nixpkgs Color-codes commands (green=valid, red=invalid)

Also installs and integrates fzf.

Keybindings:

Key Action
Ctrl+R Fuzzy-search shell history
Ctrl+T Fuzzy-search files
Ctrl+H Fuzzy-search cheatsheet and insert selected command at cursor

Also:

  • Uses Starship as the prompt theme (Tokyo Night preset, language indicators disabled)
  • Sources ~/.zshrc.local if it exists — use this for machine-specific config (e.g., work SSH keys, Homebrew, env variables) that shouldn't be committed to git

home.nix

Also installs:

Tool Description
bat A better cat with syntax highlighting and line numbers
Cargo Rust package manager and build tool
Claude Code Anthropic's CLI for Claude
FiraCode Nerd Font Monospace font with ligatures and icons
JetBrains Mono Nerd Font Monospace font optimized for reading code
Ghostty GPU-accelerated terminal emulator (ghostty-bin on macOS, ghostty on Linux)
GNU coreutils GNU versions of ls, cp, mv, etc.
Go Go programming language
Node.js JavaScript runtime
protobuf Protocol Buffers compiler (protoc)
Python 3 Python programming language
Terraform Infrastructure-as-code CLI
tmux Terminal multiplexer (mouse mode enabled)

After activating, set the font in your terminal emulator's settings to "FiraCode Nerd Font" or "JetBrainsMono Nerd Font".

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages