No description
  • Nix 93.3%
  • CSS 6.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-20 09:42:13 -05:00
config mac tmux working 2025-03-27 12:10:51 -05:00
mac feat(nix): common package for all 2026-02-14 23:55:25 -06:00
modules fix(dotfiles): unused alias 2026-03-20 09:42:13 -05:00
nixos feat(nix): common package for all 2026-02-14 23:55:25 -06:00
wsl feat(nix): common package for all 2026-02-14 23:55:25 -06:00
.gitignore fix(nix) updating channels and ai agents 2026-01-13 11:57:34 -06:00
flake.lock chore(nix): update flake version 2026-02-20 07:43:22 -06:00
flake.nix feat(nix) updated tooling to not depend on dotfiles repo anymore 2026-01-17 17:59:33 -06:00
LICENSE Initial commit 2024-01-16 20:54:58 -06:00
README.md feat(nix) updated tooling to not depend on dotfiles repo anymore 2026-01-17 17:59:33 -06:00

Nix Configuration

Unified flake-based Nix configuration for macOS (home-manager only), NixOS, and WSL.

Structure

  • mac/ - macOS home-manager configuration
  • nixos/ - NixOS system configuration
  • wsl/ - WSL NixOS configuration
  • modules/ - Shared configuration modules (git, zsh, tmux, shell, nvim)
  • flake.nix - Root flake managing all systems

Installation

macOS (Home Manager)

  1. Clone the repo:

    git clone <repo-url> ~/git/dotfiles-nix
    cd ~/git/dotfiles-nix
    
  2. Install home-manager if not already installed:

    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
    
  3. Apply configuration:

    home-manager switch --flake .#"mvaldes@mac"
    

NixOS

  1. Clone the repo:

    git clone <repo-url> ~/git/dotfiles-nix
    
  2. Create symlink to /etc/nixos:

    sudo ln -s ~/git/dotfiles-nix /etc/nixos
    
  3. Test the configuration:

    sudo nixos-rebuild test --flake /etc/nixos#nixos
    
  4. If successful, apply permanently:

    sudo nixos-rebuild switch --flake /etc/nixos#nixos
    

WSL

  1. Clone the repo:

    git clone <repo-url> ~/git/dotfiles-nix
    
  2. Create symlink to /etc/nixos:

    sudo ln -s ~/git/dotfiles-nix /etc/nixos
    
  3. Test the configuration:

    sudo nixos-rebuild test --flake /etc/nixos#wsl
    
  4. If successful, apply permanently:

    sudo nixos-rebuild switch --flake /etc/nixos#wsl
    

Usage

macOS

# Update configuration
cd ~/git/dotfiles-nix
home-manager switch --flake ".#mvaldes@mac" --impure

# Update flake inputs
nix flake update

# Check what will change
home-manager build --flake ".#mvaldes@mac"

NixOS

# Update configuration
sudo nixos-rebuild switch --flake /etc/nixos#nixos

# Update flake inputs
cd /etc/nixos && sudo nix flake update

# Test configuration without applying
sudo nixos-rebuild test --flake /etc/nixos#nixos

WSL

# Update configuration
sudo nixos-rebuild switch --flake /etc/nixos#wsl

# Update flake inputs
cd /etc/nixos && sudo nix flake update

# Test configuration without applying
sudo nixos-rebuild test --flake /etc/nixos#wsl

Notes

  • Username: Default username is mvaldes - update in each system's configuration file if needed
  • macOS External Dependencies: The Mac config references dotfiles at ~/git/dotfiles/. To build without --impure, you'll need to either:
    • Move those files into this repo under a dotfiles/ directory
    • Use --impure flag: home-manager switch --flake .#"mvaldes@mac" --impure
  • Shared Modules: All systems share common configuration modules for git, zsh, tmux, and shell programs