Skip to content

tundra-node/nix-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌲 Nix Configuration

Multi-system Nix configuration with Everforest Dark theme for macOS (M2) and NixOS (Intel laptop).

NixOS 25.05 Built with Nix

πŸ“‹ Quick Links

πŸ’» Systems

System Architecture WM/DE Status
MacBook M2 aarch64-darwin yabai + SketchyBar βœ… Active
HP ProBook 450 G8 x86_64-linux Hyprland + Waybar βœ… Active

Shared Features:

  • 🎨 Everforest Dark Medium theme
  • 🐚 Zsh + Starship
  • πŸ“ Kitty terminal
  • πŸ”§ Dev tools: Python, Node.js, Go, Rust

πŸš€ Quick Start

First-Time Setup

# Clone the repository
git clone https://github.com/tundra-node/nix-config ~/.config/nix-config
cd ~/.config/nix-config

# Run interactive setup
./scripts/setup.sh

The setup script will:

  1. Detect your OS
  2. Prompt for your details (username, email)
  3. Configure everything automatically
  4. Show you the next steps

Manual Setup

macOS:

cd hosts/darwin
./replace.sh youruser yourgithubuser your@email.com
cd ../..
nix flake update
sudo darwin-rebuild switch --flake .#macbook

NixOS:

# Copy hardware config
sudo cp /etc/nixos/hardware-configuration.nix ./hosts/nixos/

# Replace placeholders (optional - or use setup.sh)
cd hosts/nixos
./replace.sh youruser yourgithubuser your@email.com
cd ../..

# Remove existing /etc/nixos and create symlink
sudo rm -rf /etc/nixos
sudo ln -s ~/.config/nix-config /etc/nixos

# Update and build
cd /etc/nixos
sudo nix flake update
sudo nixos-rebuild switch --flake .#laptop

✨ Features

macOS (yabai + SketchyBar)

  • Window Manager: yabai with Everforest borders
  • Status Bar: Custom SketchyBar with system info
  • Package Manager: Nix + Homebrew for GUI apps

NixOS (Hyprland + Waybar)

  • Compositor: Hyprland with blur and transparency
  • Status Bar: Translucent Waybar
  • Login: SDDM with Chili theme
  • Power: TLP optimized
  • Extras: Dunst, rofi, screenshot tools

Development Environment

Languages:  Python 3.12, Node.js 22, Go, Rust
CLI Tools:  bat, eza, fzf, ripgrep, zoxide
Git:        gh, lazygit
Editors:    VSCodium, Neovim (via packages)

πŸ“₯ Installation

Prerequisites

Both Systems:

  • Nix package manager (install)
  • Git

macOS Only:

  • nix-darwin (install)
  • Command Line Tools: xcode-select --install

NixOS Only:

  • Fresh NixOS installation

Step-by-Step

macOS Installation
  1. Clone repo:

    git clone https://github.com/tundra-node/nix-config ~/.config/nix-config
    cd ~/.config/nix-config
  2. Run setup:

    ./scripts/setup.sh
  3. For yabai (optional):

    • Disable SIP in Recovery Mode
    • Reboot holding Cmd+R (Intel) or Power button (M1/M2)
    • Terminal β†’ csrutil disable
    • Reboot normally
  4. Post-install:

    brew services restart sketchybar
    brew services restart yabai
NixOS Installation
  1. Clone repo:

    git clone https://github.com/tundra-node/nix-config ~/.config/nix-config
    cd ~/.config/nix-config
  2. Copy hardware config:

    sudo cp /etc/nixos/hardware-configuration.nix ./hosts/nixos/
  3. Run setup (recommended):

    ./scripts/setup.sh

    Or manual setup:

    # Replace placeholders in config files
    cd hosts/nixos
    ./replace.sh youruser yourgithubuser your@email.com
    cd ../..
  4. Create symlink to config:

    # Remove default /etc/nixos directory
    sudo rm -rf /etc/nixos
    
    # Create symlink (no trailing slash!)
    sudo ln -s ~/.config/nix-config /etc/nixos
    
    # Verify it worked
    ls -la /etc/nixos
    # Should show: /etc/nixos -> /home/youruser/.config/nix-config
  5. Update timezone in hosts/nixos/configuration.nix:

    time.timeZone = "Your/Timezone";  # e.g., "America/New_York"
  6. Build and reboot:

    cd /etc/nixos
    sudo nix flake update
    sudo nixos-rebuild switch --flake .#laptop
    sudo reboot
  7. First login:

    • Select "Hyprland" session at SDDM
    • Super + T β†’ Terminal
    • Super + Space β†’ App launcher

πŸ“š Usage

Helper Scripts

All scripts are in scripts/:

# Rebuild system
./scripts/rebuild.sh

# Update flake and rebuild
./scripts/rebuild.sh --update

# Test without committing (NixOS)
./scripts/rebuild.sh --test

# Change wallpaper
./scripts/wallpaper.sh /path/to/wallpaper.jpg

# Refresh themes (NixOS)
./scripts/refresh-theme.sh

Common Tasks

Update everything:

./scripts/rebuild.sh --update

Edit configuration:

# macOS
code ~/.config/nix-config/hosts/darwin/

# NixOS
code ~/.config/nix-config/hosts/nixos/

Add a package:

  1. Edit home.nix in your system folder
  2. Add to home.packages = with pkgs; [ your-package ];
  3. Rebuild: ./scripts/rebuild.sh

Keybindings

NixOS (Hyprland)
Key Action
Super + T Kitty terminal
Super + B Librewolf browser
Super + Space App launcher
Super + Q Close window
Super + F Toggle float
Super + H/J/K/L Navigate windows
Super + 1-9 Switch workspace
Super + Shift + 1-9 Move to workspace

Media keys work out of the box (brightness, volume, play/pause)

macOS (yabai)

Standard macOS shortcuts apply. Check modules/darwin/sketchybar/ for custom configs.

Shell Aliases

ll        # eza -la --icons
cat       # bat (syntax highlighting)
cd x      # z x (smart jumping with zoxide)

g         # git
gs        # git status
gc        # git commit
gp        # git push

🎨 Customization

Change Theme Colors

Edit the Everforest colors in your home.nix:

# Look for color definitions like:
background = "#2d353b";
foreground = "#d3c6aa";
# Change to your preferred colors

Adjust Transparency (NixOS)

In hosts/nixos/home.nix, modify opacity values:

windowrulev2 = [
  "opacity 0.90 0.80,class:^(kitty)$"  # More opaque
  "opacity 0.75 0.65,class:^(kitty)$"  # More transparent
];

Change Wallpaper

# Quick change
./scripts/wallpaper.sh /path/to/image.jpg

# Or manually
cp image.jpg ~/.config/nix-config/wallpapers/wallpaper.jpg
./scripts/wallpaper.sh --reload

πŸ”§ Troubleshooting

Build fails with "error: No such file or directory"

Make sure you've run git add . - flakes only include tracked files!

git add .
git commit -m "Add configuration"
NixOS: /etc/nixos symlink created inside directory instead of replacing it

This happens if /etc/nixos already exists as a directory. Fix:

# Remove the existing directory
sudo rm -rf /etc/nixos

# Create the symlink correctly (no trailing slash!)
sudo ln -s ~/.config/nix-config /etc/nixos

# Verify
ls -la /etc/nixos
# Should show: /etc/nixos -> /home/youruser/.config/nix-config
NixOS: Cursor/GTK theme not applying
./scripts/refresh-theme.sh
# Log out and back in
NixOS: Hyprland won't start
  1. Switch to TTY: Ctrl + Alt + F2
  2. Check logs: journalctl -u display-manager.service
  3. Try manual start: Hyprland
macOS: yabai not tiling windows

Check SIP status: csrutil status

Should say "disabled". If not, disable in Recovery Mode.

🀝 Contributing

This is a personal configuration, but feel free to:

  • Fork for your own use
  • Open issues for bugs
  • Submit PRs for improvements

πŸ“„ License

MIT License - Use freely!

πŸ™ Acknowledgments


Version Info:

  • nixpkgs: 25.05
  • home-manager: release-25.05
  • nix-darwin: nix-darwin-25.05

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •