Skip to content

ryoppippi/dotfiles

Repository files navigation

dotfiles

DeepWiki

Nix Configuration

This repository uses Nix with a modular structure for managing system configuration and dotfiles across macOS and Linux.

Module Structure

The configuration is organised into modular files:

  • flake.nix - Main entry point with inputs/outputs
  • nix/home.nix - Home Manager configuration (cross-platform)
    • Dotfiles symlinks using home.file
    • User package list
    • Platform-specific packages via pkgs.stdenv.isDarwin
  • nix/darwin.nix - macOS system configuration (nix-darwin)
    • System settings and user configuration
    • Homebrew packages (taps, brews, casks, masApps)
  • nix/overlays.nix - Package overlays for AI tools

Initial Setup

macOS

  1. Install Nix:

     curl -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- install --enable-flakes
  2. Get this repository with ghq:

    nix shell nixpkgs#ghq nixpkgs#git --command ghq get github.com/ryoppippi/dotfiles
    cd "$(nix shell nixpkgs#ghq --command ghq root)/github.com/ryoppippi/dotfiles"
  3. Open the Mac App Store:

    open -a "App Store" # Sign in with your Apple Account before continuing.
  4. Apply the nix-darwin configuration (this will also install Homebrew automatically):

    sudo xcodebuild -license accept
    nix --accept-flake-config run .#switch
  5. Reload your shell:

    exec fish

GitHub API rate limit

If Nix reports a GitHub API rate limit, load a GitHub token into GITHUB_TOKEN from a credential helper or password manager, then retry with authenticated GitHub access. Do not paste the token directly into the command or commit it to this repository.

NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN" \
  nix --accept-flake-config run .#switch

Linux

  1. Install Nix (if not already installed):

    curl --proto '=https' --tlsv1.2 -sSf -L https://install.nixos.org | sh -s -- install
  2. Get this repository with ghq:

    nix shell nixpkgs#ghq nixpkgs#git --command ghq get github.com/ryoppippi/dotfiles
    cd "$(nix shell nixpkgs#ghq --command ghq root)/github.com/ryoppippi/dotfiles"
  3. Apply Home Manager configuration:

    nix run .#switch

Daily Usage

After modifying configuration files (flake.nix, nix/home.nix, nix/darwin.nix):

# Apply changes (macOS or Linux)
nix run .#switch

# Update dependencies (macOS only)
nix run .#update

# Test build without applying
nix run .#build

Available Nix Apps

macOS

  • nix run .#switch - Build and apply darwin + Home Manager configuration
  • nix run .#update - Update flake.lock dependencies
  • nix run .#update-ai-tools - Update llm-agents input
  • nix run .#build - Build configuration (dry run)

Linux

  • nix run .#switch - Build and apply Home Manager configuration
  • nix run .#build - Build configuration (dry run)

Dotfiles Management

All dotfiles are managed via Home Manager's home.file with symlinks to the repository:

  • Symlinks are automatically created on nix run .#switch
  • Dotfiles remain mutable in the repository
  • No separate dotfiles CLI needed

Managed by Nix

  • AI Development Tools: claude-code, codex, cursor-agent, opencode, copilot-cli, coderabbit-cli
  • Core Tools: git, neovim, fish, tmux, ripgrep, fd, fzf, bat, eza, and more
  • Development: Go, Node.js, Bun, Deno, language servers
  • System Configuration (macOS): Touch ID for sudo, Homebrew integration

Stats

Alt

About

ryoppippi's dotfiles

Resources

License

Stars

245 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors