Skip to content

ChetanBhasin/nix-config

Repository files navigation

Chetan's Nix Configuration

Built with Nix macOS License

A comprehensive Nix configuration for reproducible development environments across macOS and Linux systems. This repository includes configurations for commonly used systems including personal laptops and server setups.

📋 Table of Contents

✨ Features

  • 🚀 Modern Terminal Setup: Zsh + FZF + Alacritty with enhanced productivity workflows
  • 🧠 Powerful IDE: Neovim with LSP, type annotations, smart navigation, and Claude AI integration
  • 🎯 Tmux Configuration: C-Space prefix, command palette, session management, and persistence
  • 📦 Package Management: Nix + Home Manager for reproducible environments
  • 🔧 Cross-Platform: macOS (Darwin) and Linux (NixOS) support
  • 🎨 Consistent Theming: Catppuccin theme across all applications
  • Performance Optimized: Fast startup times and efficient resource usage
  • 🔐 Security Focused: Proper SSH configurations and secure defaults

🚀 Quick Start

  1. Clone the repository:

    git clone https://github.com/your-username/nix-config.git
    cd nix-config
  2. Choose your installation method:

  3. Apply configuration:

    make apply-darwin host=hugh  # Replace 'hugh' with your preferred host
  4. Enjoy your new environment! 🎉

🔌 Using as a Flake Input

You can use the NeoVim, Terminal, and Tmux configurations in your own flake without adopting the entire configuration:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    home-manager.url = "github:nix-community/home-manager";

    # Add this config as an input
    cb-config.url = "github:chetanbhasin/nix-config";
  };

  outputs = { nixpkgs, home-manager, cb-config, ... }: {
    homeConfigurations.myuser = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.aarch64-darwin;
      modules = [
        # Import individual modules
        cb-config.homeManagerModules.neovim
        cb-config.homeManagerModules.terminal
        cb-config.homeManagerModules.tmux

        # Or import all at once
        # cb-config.homeManagerModules.default

        # Configure the modules
        {
          cb.neovim.enable = true;
          cb.terminal.enable = true;
          cb.tmux.enable = true;
        }
      ];
    };
  };
}

Available Modules

Module Description Options
neovim Full NeoVim IDE with LSP, treesitter, and 50+ plugins cb.neovim.enable, cb.neovim.enableTmuxIntegration, cb.neovim.treesitterGrammars
terminal Zsh + FZF + Starship + Direnv + Zoxide + Alacritty cb.terminal.enable, cb.terminal.enableFzf, cb.terminal.enableStarship, cb.terminal.viMode
tmux Modern tmux with sessions, FZF, and Catppuccin theme cb.tmux.enable, cb.tmux.enableVimIntegration, cb.tmux.enableSessionPersistence
default All modules combined All options from above

See Module Options Documentation for complete configuration options.

📖 Documentation

📖 IDE Setup Guide - Comprehensive guide to the powerful Neovim IDE configuration with language servers, type annotations, keyboard shortcuts, Claude AI integration, and development workflows.

🚀 Terminal Configuration Guide - Complete guide to the modern terminal setup with Zsh, FZF, tmux, and Alacritty for enhanced productivity and development workflows.

📦 Module Options - Complete reference for all exportable Home Manager module options.

Development

# Test configuration without applying
nix build .#darwinConfigurations.hugh.system

# Check flake
nix flake check

# Update inputs
nix flake update

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Credits

Special thanks to:

  • Frank for sharing his Nix configuration, which served as an excellent learning resource
  • The Nix Community for maintaining an incredible ecosystem
  • Plugin Authors for creating the amazing tools that make this configuration possible
  • Contributors who help improve this configuration

About

Nix configuration for the systems that I use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors