A full dotfiles repository and development environment setup for Ubuntu Desktop, WSL2, and Docker-based workflows. Provides a consistent ZSH setup, tools, and configurations across machines.
git clone https://github.com/rustamgk/dotfiles.git ~/github/dotfiles
cd ~/github/dotfiles && ./scripts/bootstrap.shOr with curl (no git clone needed first):
bash <(curl -fsSL https://raw.githubusercontent.com/rustamgk/dotfiles/master/scripts/bootstrap.sh)git clone https://github.com/rustamgk/dotfiles.git ~/github/dotfiles
cd ~/github/dotfiles && make installcd ~/github/dotfiles && make sync
git add configs/ && git commit -m "sync: update configs from $(hostname)"| Category | Tools |
|---|---|
| Shell | ZSH, Oh My ZSH, fzf-tab, zsh-syntax-highlighting |
| Prompt | Starship (with Ayu Mirage config) |
| Terminal MUX | tmux + TPM + plugins |
| Editor | Neovim (latest) + Lazy.nvim config |
| Search | fzf, ripgrep (rg), fd, bat |
| Navigation | zoxide (smart cd), autojump |
| File tools | eza (ls++), mc (Midnight Commander), delta (git diff) |
| Kubernetes | kubectl, helm, k9s, kubectx, kubens |
| DevOps | terraform, ansible, argocd, flux, stern |
| Cloud | awscli, azure-cli, saml2aws |
| Languages | pyenv + Python 3.12, nvm + Node 20 LTS, Go, Rust/Cargo |
| Misc | lazygit, trashy, lolcat, cowsay, fortune |
| Fonts | JetBrainsMono Nerd Font |
| macOS GUI apps | Kitty terminal, Docker Desktop, 1Password CLI (Homebrew casks) |
dotfiles/
βββ configs/ # All dotfiles (symlinked to $HOME)
β βββ .zshrc # ZSH configuration (cross-platform)
β βββ .tmux.conf # Tmux config
β βββ .tmux.base.conf # Tmux base keybindings
β βββ .gitconfig # Git configuration
β βββ starship.toml # Starship prompt config
β βββ nvim/ # Neovim config (Lazy.nvim)
βββ scripts/
β βββ bootstrap.sh # Full Ubuntu setup (run once on new machine)
β βββ install.sh # Symlink configs to $HOME
β βββ entrypoint.sh # Docker container entrypoint
βββ themes/ # Terminal color schemes (Ayu Mirage)
β βββ linux-terminals/ # Alacritty, Kitty, Gnome Terminal, etc.
β βββ macos-terminal/
β βββ windows-terminal/
βββ Makefile # Shortcuts for common operations
make bootstrap # Full install on a new machine
make install # Just link configs to $HOME
make sync # Copy live configs back into this repo
make build # Build Docker image
make run # Start Docker dev environment
make connect # Connect to running Docker container
make stop # Stop Docker container
make clean # Remove Docker resourcesSecrets are stored in ~/.zshrc.local (not tracked in git). After running install.sh, a template is created automatically:
# ~/.zshrc.local
export GITLAB_ACCESS_TOKEN="your-token"
export GITLAB_USER_NAME="rustam.galimyanov"
export AWS_ACCESS_KEY_ID="..."- Universal Package Management: Uses Homebrew for consistent package installation across platforms
- Rich Terminal Experience: ZSH with Oh My Zsh, Starship prompt, and tmux
- Development Tools: kubectl, helm, k9s, nvim, git, fzf, and more
- Platform Detection: Automatically detects and configures for macOS, Linux, or Windows
- Multiple Profiles: Separate environments for personal and different work projects
- Persistent Data: Maintains history, sessions, and configurations across container restarts
- SSH Integration: Supports SSH key mounting for seamless git operations
- Shell: ZSH with Oh My Zsh and extensive plugins (autosuggestions, syntax highlighting)
- Editor: Neovim with LazyVim configuration featuring LSP, formatting, and DevOps tooling
- Terminal Multiplexer: tmux (latest version) with plugins for session management
- Version Control: Git with aliases and configuration for efficient workflows
- File Manager: Midnight Commander (mc) with custom theme for visual file navigation
-
Kubernetes Management:
kubectl- Official Kubernetes command-line toolk9s- Terminal-based UI for Kubernetes clustershelm- Package manager for Kubernetes applicationskubectx- Fast context switching between Kubernetes clustersstern- Multi-pod and container log tailingkustomize- Template-free configuration customizationkrew- Plugin manager for kubectl
-
Infrastructure as Code:
terraform- Infrastructure provisioning and managementterragrunt- Terraform wrapper for DRY configurationstflint- Terraform linter for catching errors and best practicesansible- Configuration management and automationflux- GitOps continuous delivery for Kubernetes
-
Cloud Platforms:
azure-cli- Microsoft Azure command-line interface with DevOps extensionsargocd- Declarative GitOps continuous delivery tool
-
Messaging & Streaming:
nats- Cloud-native messaging system CLI tools
-
Programming Languages:
go- Go programming language and toolchainpython3withpyenv- Python version managementnode- Node.js runtime and npm package manager
-
Container Security:
trivy- Comprehensive vulnerability scanner for containers and filesystemsgrype- Vulnerability scanner for container images and filesystemsdive- Tool for exploring Docker image layers and optimizing image size
-
Kubernetes Security:
kubeaudit- Kubernetes security auditing toolkube-bench- CIS Kubernetes Benchmark security scannerkube-hunter- Kubernetes penetration testing tool
-
Code Quality & Security:
hadolint- Dockerfile linter for best practices and securitycheckov- Static code analysis for Terraform, CloudFormation, and more
-
Search & Navigation:
fzf- Command-line fuzzy finder for files, commands, and morezoxide- Smarter cd command that learns your habitsautojump- Directory navigation based on frequency and recency
-
File Operations:
eza- Modern replacement for ls with colors and iconsbat- Syntax-highlighted cat clone with Git integrationripgrep- Ultra-fast text search tool (grep alternative)fd- Simple, fast alternative to find commandtree- Display directory structures as trees
-
System Monitoring:
htop- Interactive process viewer and system monitorbtop- Modern resource monitor with beautiful interface
-
Data Processing:
jq- Command-line JSON processoryq- YAML/XML/TOML processor (like jq for YAML)yamllint- YAML linter for syntax and style checking
-
Git & Development:
lazygit- Terminal UI for Git commands with visual interfacegh- GitHub CLI for repository management and workflows
-
Documentation & Help:
tldr- Simplified man pages with practical examples
-
Terminal Enhancement:
starship- Cross-shell prompt with Git, Kubernetes context, and more
-
Network & API Tools:
grpcurl- Command-line tool for gRPC services (like curl for gRPC)
dotfiles/
βββ Dockerfile # Main container definition (personal)
βββ Dockerfile.sarna # Sarna work environment
βββ Dockerfile.sdui # SDUI work environment
βββ docker-compose.yml # Personal environment (Linux/macOS)
βββ docker-compose.sarna.yml # Sarna work environment
βββ docker-compose.sdui.yml # SDUI work environment
βββ docker-compose.windows.yml # Windows native Docker configuration
βββ devenv.sh # Universal management script (Linux/macOS)
βββ devenv.ps1 # PowerShell management script (Windows)
βββ devenv.bat # Batch wrapper for Windows CMD
βββ Makefile # Make shortcuts for Linux/macOS
βββ configs/ # Configuration files
β βββ .zshrc # ZSH configuration
β βββ .tmux.conf # tmux configuration
β βββ starship.toml # Starship prompt configuration
β βββ .gitconfig # Git configuration
β βββ nvim/ # LazyVim configuration
β βββ init.lua # Neovim entry point
β βββ lua/
β βββ config/ # LazyVim config overrides
β βββ plugins/ # Custom plugin configurations
βββ themes/ # Terminal color themes (Ayu Mirage)
β βββ windows-terminal/ # Windows Terminal theme
β βββ macos-terminal/ # macOS Terminal theme
β βββ linux-terminals/ # Linux terminal themes (Kitty, Alacritty, etc.)
βββ scripts/ # Helper scripts
βββ entrypoint.sh # Container startup script
βββ setup-mounts.sh # Platform-specific mount setup
- Docker Desktop (Windows users need native Docker Desktop)
- Git (to clone this repository)
- Windows users: Docker Desktop for Windows (no WSL2 required)
-
Clone the repository:
git clone <your-dotfiles-repo-url> cd dotfiles
-
Run the environment (automatically pulls or builds image):
The system will automatically try to pull a pre-built image from Docker Hub first, and only build locally if needed.
Linux/macOS:
# Personal environment (default) ./devenv.sh run # or explicitly ./devenv.sh personal run # Work environments ./devenv.sh work_sarna run ./devenv.sh work_sdui run
Windows (PowerShell):
# Personal environment (default) .\devenv.ps1 run # or explicitly .\devenv.ps1 personal run # Work environments .\devenv.ps1 work_sarna run .\devenv.ps1 work_sdui run
Windows (Command Prompt):
devenv.bat personal run devenv.bat work_sarna run devenv.bat work_sdui run
-
Connect to your environment:
Linux/macOS:
./devenv.sh personal connect ./devenv.sh work_sarna connect ./devenv.sh work_sdui connect
Windows:
.\devenv.ps1 personal connect .\devenv.ps1 work_sarna connect .\devenv.ps1 work_sdui connect
The development environment is automatically built and published to Docker Hub via GitHub Actions. This means:
- First run: Automatically pulls the latest pre-built image from Docker Hub
- Fallback: Builds locally if the pull fails or image doesn't exist
- Fast startup: No need to build locally on first use
rustamgk/dotfiles:latest- Personal development environmentrustamgk/dotfiles:sarna- Sarna work environmentrustamgk/dotfiles:sdui- SDUI work environment
# Pull latest image from Docker Hub
./devenv.sh personal pull
./devenv.sh work_sarna pull
# Force rebuild locally
./devenv.sh personal rebuild
./devenv.sh work_sarna rebuild
# Check image status
./devenv.sh statusYou can manually trigger image builds from GitHub:
- Go to your repository on GitHub
- Click Actions tab
- Select "Build and Push Docker Images" workflow
- Click Run workflow button
- Choose options:
- Profile:
all,personal,sarna, orsdui - Platforms:
linux/amd64,linux/arm64(recommended) or single platform
- Profile:
- Click Run workflow
This is useful for:
- Building specific profiles only
- Testing changes before merging
- Rebuilding images after configuration updates
Images are automatically built and pushed to Docker Hub when:
- Code is pushed to main/master branch
- Dockerfile or configs are modified
- Manual workflow dispatch is triggered (you can choose specific profiles and platforms)
- Workspace:
~/workspaceβ/home/rustamgk/workspace - Helm:
~/helmβ/home/rustamgk/helm
- Workspace:
~/workspaceβ/home/rustamgk/workspace - Helm:
~/helmβ/home/rustamgk/helm
- Workspace:
C:\workspaceβ/home/rustamgk/workspace - Helm:
C:\helmβ/home/rustamgk/helm
The devenv.sh script provides easy management of your development environment:
# Start environment (pulls from Docker Hub or builds locally)
./devenv.sh run
# Pull latest image from Docker Hub
./devenv.sh pull
# Build image locally
./devenv.sh build
# Force rebuild locally (ignores existing image)
./devenv.sh rebuild
# Connect to running environment
./devenv.sh connect
# Stop the environment
./devenv.sh stop
# Restart the environment
./devenv.sh restart
# View container logs
./devenv.sh logs
# Check status
./devenv.sh status
# Show help
./devenv.sh helpThe devenv.ps1 script provides the same functionality for Windows:
# Start environment (pulls from Docker Hub or builds locally)
.\devenv.ps1 run
# Pull latest image from Docker Hub
.\devenv.ps1 pull
# Build image locally
.\devenv.ps1 build
# Force rebuild locally (ignores existing image)
.\devenv.ps1 rebuild
# Connect to running environment
.\devenv.ps1 connect
# Stop the environment
.\devenv.ps1 stop
# Restart the environment
.\devenv.ps1 restart
# View container logs
.\devenv.ps1 logs
# Check status
.\devenv.ps1 status
# Show help
.\devenv.ps1 helpUse the batch file for CMD:
devenv.bat run
devenv.bat connect
devenv.bat stop# Switch between clusters quickly
kubectx production
kubectx staging
# Monitor multiple pods
stern app-name
# Interactive cluster management
k9s
# Package management
helm search repo nginx
helm install my-nginx stable/nginx
# Security scanning
kube-bench run --targets=node,policies,managedservices
kubeaudit all# Scan container images for vulnerabilities
trivy image nginx:latest
grype nginx:latest
# Analyze image layers for optimization
dive nginx:latest
# Lint Dockerfiles
hadolint Dockerfile# Terraform workflows with validation
terraform plan
tflint
terragrunt plan-all
# Security scanning for infrastructure
checkov -f main.tf
checkov -d ./terraform/
# YAML processing and validation
yamllint docker-compose.yml
yq eval '.services.*.image' docker-compose.yml# Fast file finding and navigation
fz # fuzzy find files
z project-name # jump to frequently used directories
# Enhanced file operations
eza -la --git # beautiful ls with git status
bat config.json # syntax highlighted file viewing
rg "TODO" --type rust # fast text search
# Git workflows
lazygit # visual git interface
gh pr create # create GitHub pull requests
gh issue list # manage GitHub issues# JSON processing
curl -s api/endpoint | jq '.data[] | select(.status == "active")'
# YAML manipulation
yq eval '.spec.containers[0].image = "nginx:1.21"' deployment.yaml
# Log analysis
stern app-name | grep ERROR# LSP features for multiple languages
:LspInfo # Check active language servers
# DevOps specific shortcuts
<leader>dk # Get Kubernetes pods
<leader>dh # List Helm releases
<leader>dt # Terraform plan
<leader>dg # Run Go tests
# File operations
<leader>ff # Find files (Telescope)
<leader>fg # Live grep
<leader>fb # Browse buffers
# YAML/JSON formatting
<leader>yf # Format YAML with yq
<leader>jf # Format JSON with jq
# Git integration
<leader>gg # LazyGit interface
<leader>gs # Git statusEdit the Dockerfile and add packages to the Homebrew install section:
RUN /home/linuxbrew/.linuxbrew/bin/brew install \
# ... existing packages ... \
your-new-package \
&& /home/linuxbrew/.linuxbrew/bin/brew cleanupEdit files in the configs/ directory:
.zshrc- ZSH shell configuration.tmux.conf- tmux configuration and pluginsstarship.toml- Prompt customization.gitconfig- Git aliases and settings
Place executable scripts in the scripts/ directory and reference them in the Dockerfile.
To use SSH keys with git and other tools:
-
Mount your SSH directory (already configured in docker-compose files):
volumes: - ${HOME}/.ssh:/home/rustamgk/.ssh:ro
-
SSH Agent: The entrypoint script automatically sets up SSH agent forwarding.
The following data persists across container restarts:
- ZSH History: Command history and settings
- tmux Sessions: Session state with tmux-resurrect
- Git Configuration: Local git settings
# Linux/macOS
docker info
./devenv.sh logs
docker system prune -a
./devenv.sh build# Windows PowerShell
docker info
.\devenv.ps1 logs
docker system prune -a
.\devenv.ps1 buildDocker Desktop Not Running:
- Ensure Docker Desktop is started
- Check system tray for Docker icon
- Restart Docker Desktop if needed
Source Directories Not Found:
The PowerShell script automatically creates C:\workspace and C:\helm directories if they don't exist.
PowerShell Execution Policy: If you get execution policy errors:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserFile Sharing Issues: Ensure Docker Desktop has access to the C: drive:
- Docker Desktop β Settings β Resources β File Sharing
- Add C:\ to shared drives if not already present
- Apply & Restart
Ensure Docker Desktop has access to the C: drive:
- Docker Desktop β Settings β Resources β File Sharing
- Add C:\ to shared drives
- Apply & Restart
If SSH keys have permission issues:
# Fix permissions on host
chmod 600 ~/.ssh/id_*
chmod 644 ~/.ssh/*.pub
chmod 700 ~/.sshEdit configs/.zshrc:
alias myalias='my command'Edit configs/.tmux.conf:
set -g @plugin 'your-new/plugin'Edit configs/starship.toml to customize the Starship prompt.
The repository includes Ayu Mirage color theme files for various terminal emulators to ensure a consistent visual experience across platforms.
- File:
themes/windows-terminal/ayu-mirage.json - Installation: Copy to Windows Terminal color schemes
- Documentation: See
themes/windows-terminal/README.md
- File:
themes/macos-terminal/Ayu-Mirage.terminal - Installation: Double-click to import or use Terminal preferences
- Documentation: See
themes/macos-terminal/README.md
Located in themes/linux-terminals/:
- Kitty:
kitty-ayu-mirage.conf - Alacritty:
alacritty-ayu-mirage.yml - GNOME Terminal:
gnome-terminal-ayu-mirage.sh(installer script) - Konsole:
konsole-ayu-mirage.colorscheme - Terminator:
terminator-ayu-mirage.conf
The Ayu Mirage theme provides a dark, modern look with the following colors:
- Background:
#1F2430(Dark blue-grey) - Foreground:
#CBCCC6(Light grey) - Cursor:
#FFCC66(Golden yellow) - Selection:
#33415E(Blue-grey)
The theme includes 16 ANSI colors optimized for readability and syntax highlighting in development environments.
- For host terminal: Apply the theme to your host terminal for consistency
- In container: The container already uses compatible colors via tmux and Neovim
- Documentation: Each theme directory contains detailed installation instructions
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
./devenv.sh run - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues:
- Check the troubleshooting section
- Review container logs with
./devenv.sh logs - Create an issue with your platform and error details
Happy coding! π