Skip to content

rwaltr/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ rwaltr's dotfiles

rwaltr logo

Container-first, multi-shell dotfiles for Linux power users with a Kubernetes & container workflow focus

Chezmoi mise Fish Shell License

๐Ÿ“‹ Table of Contents

๐ŸŽฏ Overview

This is my personal dotfiles repository, designed to provide a consistent development environment across:

  • Linux workstations (Fedora/Universal Blue)
  • macOS (work machine, minimal support)
  • Container environments (Distrobox, Podman, Docker)
  • Future: Kubernetes debug pods (coming soon!)

Target Audience: Linux power users who work with containers, Kubernetes, and need a portable, consistent shell environment anywhere.

๐Ÿ’ก Philosophy

Container-First Design

Everything is designed to run in userspace and work seamlessly in containerized environments:

  • โœ… No system-level configuration - Works on immutable OSes (Fedora Atomic, etc.)
  • โœ… Portable - Same environment in Distrobox, Podman, or bare metal
  • โœ… Self-contained - All tools managed via mise, no root required
  • โœ… Future-proof - Ready for Kubernetes debug containers

Multi-Shell by Purpose

Different shells for different tasks, not just preference:

  • ๐Ÿš Fish - Primary interactive shell (user-friendly, modern)
  • ๐Ÿ“œ Bash - Scripting and automation (universal, POSIX)
  • ๐Ÿ“Š Nushell - Data processing (structured pipelines)
  • ๐Ÿ”„ Zsh - macOS compatibility bridge (shares Bash config)

User-Space Only

This repo does not manage:

  • โŒ Host NetworkManager configurations
  • โŒ Systemd services (host level)
  • โŒ Server/system administration
  • โŒ Package installation on host

This keeps configs portable and safe for immutable operating systems.

โœจ Features

๐Ÿ”ง Development Tools

  • Editor: Neovim (Lua-based configuration)
  • Terminal: Wezterm with sessionizer
  • Shell Tools: Starship prompt, Carapace completions, eza, bat, fzf
  • Version Management: mise (formerly rtx)
  • Git Hooks: hk (high-performance, mise-integrated)

โ˜ธ๏ธ Kubernetes & Containers

  • Container Runtime: Podman + Distrobox

  • K8s Tools: kubectl, krew plugins

  • Custom kubeconfig manager (Fish shell)

    # Automatically merges configs from ~/.kube/clusters/
    set-kubeconfig          # Load all configs
    isolate-kubeconfig path # Use single config
    append-kubeconfig path  # Add to current context
    store-kubeconfig path   # Save to clusters dir

๐Ÿ” Secrets Management

  • 1Password CLI integration via Chezmoi templates
  • Personal use only (not for team/shared secrets)

๐Ÿ“ฆ Package Management

  • CLI Tools: Homebrew (general use), mise (project-specific versions)
  • GUI Apps: Flatpak (Linux only)
  • Containers: Podman + Distrobox exported apps
  • Language Tools: Managed by mise per-project (Python, Node, Go, Rust, etc.)

๐ŸŽจ Desktop Environments

  • Niri (Wayland tiling compositor)
  • KDE Plasma (full desktop)

๐Ÿš€ Quick Start

Option 1: With Chezmoi Installed

# Initialize and apply dotfiles
chezmoi init rwaltr
chezmoi apply

Coming Soon: Auto-install mise, Homebrew, and Flatpaks during init

Option 2: Bootstrap Without Chezmoi

# Self-contained installer (downloads chezmoi)
sh -c "$(curl -fsLS https://raw.githubusercontent.com/rwaltr/dotfiles/master/install.sh)"

Option 3: In a Container

# Quick ephemeral environment (Docker/Podman)
podman run -it --rm fedora:latest bash -c "
  dnf install -y git curl &&
  sh -c \"\$(curl -fsLS https://raw.githubusercontent.com/rwaltr/dotfiles/master/install.sh)\"
"

# Persistent Distrobox environment (Linux only)
distrobox create --image ghcr.io/ublue-os/bluefin-cli:latest --name dev
distrobox enter dev
chezmoi init rwaltr && chezmoi apply

๐Ÿš Shell Strategy

Why Multiple Shells?

Each shell serves a specific purpose based on its strengths:

Fish (Primary Interactive)

Use for: Daily interactive work, command exploration, quick tasks

Strengths:

  • Modern, intuitive syntax
  • Excellent tab completion
  • Syntax highlighting out-of-the-box
  • User-friendly interactive features

Example Config:

# ~/.config/fish/config.fish
# Modular configuration via conf.d/*.fish
# Custom functions in functions/*.fish

Bash (Universal Scripting)

Use for: Scripts, automation, CI/CD, compatibility

Strengths:

  • Available everywhere (including containers, minimal systems)
  • POSIX compatible
  • Industry standard for scripting

Example Structure:

# Modular configuration in ~/.config/bashrc.d/
# Loaded alphabetically:
# - 0.*.sh (core setup)
# - *.sh (tool configs)

Nushell (Data Processing)

Use for: Log analysis, data transformation, structured pipelines

Strengths:

  • Structured data (tables, records)
  • Type-aware commands
  • SQL-like queries

Example Use Case:

# Parse JSON logs with structured queries
cat logs.json | from json | where status == 500 | length

Zsh (macOS Bridge)

Use for: macOS compatibility (when Fish isn't an option)

Strengths:

  • Shares Bash configuration (POSIX compatible)
  • Minimal maintenance
  • Smoother transition for Bash users

Configuration:

  • Sources from ~/.config/bashrc.d/ (shared with Bash)
  • Minimal Zsh-specific setup

๐Ÿ“ Project Structure

dotfiles/
โ”œโ”€โ”€ .chezmoiroot          # Points source to home/ directory
โ”œโ”€โ”€ install.sh            # Bootstrap script (no chezmoi required)
โ”œโ”€โ”€ mise.toml             # Development tools & tasks
โ”œโ”€โ”€ hk.pkl                # Git hooks configuration
โ”œโ”€โ”€ .markdownlint-cli2.jsonc  # Markdown linting rules
โ”‚
โ”œโ”€โ”€ home/                 # Chezmoi source directory (becomes ~/)
โ”‚   โ”œโ”€โ”€ .chezmoiexternal.yaml  # External asset management
โ”‚   โ”œโ”€โ”€ .chezmoiignore    # Files to skip
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ dot_config/
โ”‚   โ”‚   โ”œโ”€โ”€ fish/         # Fish shell (15+ modular files)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ config.fish
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ conf.d/   # Auto-loaded configs
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ functions/
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ bashrc.d/     # Modular Bash configs (17 files)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 0.*.sh    # Core (load order)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ *.sh      # Tool-specific
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ nvim/         # Neovim Lua config
โ”‚   โ”‚   โ”œโ”€โ”€ wezterm/      # Terminal config
โ”‚   โ”‚   โ”œโ”€โ”€ mise/         # mise configuration
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ dot_local/
โ”‚       โ””โ”€โ”€ bin/          # Custom scripts
โ”‚
โ”œโ”€โ”€ AGENTS.md             # Comprehensive context for AI agents
โ””โ”€โ”€ README.md             # This file

Key Files

  • mise.toml - Development tools, linting/formatting tasks
  • hk.pkl - Git pre-commit/pre-push hooks (delegates to mise)
  • AGENTS.md - Deep dive for AI coding assistants (like pi!)
  • home/dot_config/bashrc.d/ - 17 modular Bash scripts
  • home/dot_config/fish/ - 15+ Fish shell modules

๐Ÿ› ๏ธ Development Workflow

Linting & Formatting

Powered by mise tasks and hk git hooks:

# Run all linters
mise run lint

# Run all formatters
mise run format

# Individual linters
mise run lint:shell      # shellcheck
mise run lint:fish       # fish --no-execute
mise run lint:lua        # stylua
mise run lint:yaml       # yamllint
mise run lint:toml       # taplo
mise run lint:markdown   # markdownlint-cli2

# Individual formatters
mise run format:shell    # shfmt
mise run format:lua      # stylua
mise run format:toml     # taplo

Git Hooks (via hk)

Automatically runs linters on commit/push:

# Install hooks (one-time)
mise run hk:install

# Manually check staged files
mise run check

# Auto-fix issues in staged files
mise run hk:fix

# Hooks run automatically
git commit -m "feat: something"  # โ† linters run here

# Skip hooks if needed (emergency only)
HK=0 git commit -m "emergency fix"

How it works: hk delegates to mise run lint, ensuring git hooks and manual checks are identical.

Managing Dotfiles

# Check what would change
chezmoi diff

# Apply changes
chezmoi apply

# Edit a file (opens in $EDITOR)
chezmoi edit ~/.config/fish/config.fish

# Add a new file to management
chezmoi add ~/.config/newapp/config.toml

# Update from repository
chezmoi update

# See status
chezmoi status

Adding New Tools

# Global tools via Homebrew (available everywhere)
brew install kubectl kubectx jq fzf ripgrep

# Project-specific versions via mise
cd ~/project
mise use node@20 python@3.12

# Or add to project's .mise.toml:
# [tools]
# node = "20"
# python = "3.12"

# Install tools
mise install

# Verify
mise list

๐Ÿค” Design Choices

Why Chezmoi?

vs Nix: More complexity than needed for dotfiles alone. Chezmoi hits the sweet spot between:

  • Simplicity: Templates, not a whole OS
  • Power: Templating, external resources, secrets management
  • Portability: Works on any system with a shell

vs Stow/bare git: Need templating for:

  • Different configs per machine
  • Secret injection from 1Password
  • OS-specific sections

Why Fish as Primary Shell?

  • Interactive Focus: 90% of shell time is interactive, not scripting
  • Modern UX: Tab completion, syntax highlighting, better defaults
  • Less Configuration: Works great out-of-the-box
  • Still Use Bash: For scripts where portability matters

Why mise?

For project-specific version management:

  • โœ… Version Management: Replaces asdf, nvm, rbenv, pyenv, etc. per-project
  • โœ… Task Runner: Built-in make alternative
  • โœ… Tool Installer: Downloads and manages CLI tools
  • โœ… Environment Management: Per-project tool versions via .mise.toml

vs Homebrew: Homebrew is for global tools used everywhere (kubectl, jq, fzf, etc.), while mise handles per-project versions (Node 18 in project A, Node 20 in project B).

vs Homebrew: Homebrew is for global tools used everywhere (kubectl, jq, fzf, etc.), while mise handles per-project versions (Node 18 in project A, Node 20 in project B).

Why Container-First?

Goal: Run this environment anywhere:

  • ๐Ÿ–ฅ๏ธ Workstation: Full setup with GUI tools
  • ๐Ÿ“ฆ Container: Lightweight dev environment
  • โ˜ธ๏ธ K8s Debug Pod: Familiar shell in production (future)
  • ๐ŸŽ macOS: Work machine compatibility

Benefits:

  • No system pollution
  • Immutable OS friendly
  • Portable and reproducible
  • Same environment everywhere

๐Ÿ”ฎ Future Plans

In Progress

  • Distrobox Assemble: Rebuild pi AI agent environment on any machine
  • Auto-install during init: mise, Homebrew, Flatpaks
  • Kubernetes debug container: Run dotfiles in kubectl debug pods

Ideas

  • Wezterm sessionizer integration with pi agent for long-running tasks
  • Container image: Pre-built Docker/Podman image with full setup
  • macOS improvements: Better Homebrew integration
  • Nushell integration: Deeper data processing workflows

๐Ÿ“š Additional Documentation

  • AGENTS.md - Comprehensive guide for AI coding assistants
    • Full project philosophy
    • File-by-file breakdown
    • Configuration patterns
    • Chezmoi workflows
    • Development tasks

๐Ÿค Contributing

This is a personal repository, but feel free to:

  • ๐Ÿ’ก Open issues with questions
  • ๐Ÿ› Report bugs or suggest improvements
  • โญ Star if you find it useful!

๐Ÿ“ License

Personal use. Feel free to use as inspiration or starting point for your own dotfiles.


Built with: Chezmoi โ€ข mise โ€ข Fish โ€ข Neovim โ€ข Wezterm

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •