mauvehed's dotfiles for personal and work environments
System Usage & OS-Specific Notes#
This document outlines system-level configurations, OS-specific notes, and common utilities relevant to this dotfiles setup across different operating systems.
Overview#
These dotfiles aim to provide a consistent experience across macOS, Linux (primarily Ubuntu), and Windows (via WSL). chezmoi plays a crucial role in managing OS-specific configurations by using templates and conditional logic based on the operating system.
General Principles#
chezmoifor OS Detection:chezmoitemplates often use variables like.chezmoi.os(e.g., "darwin", "linux", "windows") to apply OS-specific settings or install different packages.- Homebrew/Linuxbrew: Homebrew (on macOS) and Linuxbrew (on Linux) are heavily utilized for package management. See
Brewfileorchezmoiscripts for lists of managed packages. - Common Utilities: Many command-line utilities are installed for enhanced productivity. Some common examples that might be included (and configured by these dotfiles) are:
exaorlsd(modernlsreplacements)bat(acatclone with syntax highlighting)fd(a simple, fast, and user-friendly alternative tofind)ripgrep(rg) (a line-oriented search tool that recursively searches your current directory for a regex pattern)fzf(a command-line fuzzy finder)zoxide(a smartercdcommand)htoporbtop(interactive process viewers)
macOS Specifics#
- Package Manager: Homebrew is the primary package manager.
- Shell: Zsh, configured via
oh-my-zshandoh-my-posh(seedocs/terminal-usage.md). - Finder Tweaks: Your
chezmoisetup might include scripts to apply common Finder settings (e.g., show hidden files, show path bar).- Example commands (often found in
run_once_scripts):# Show hidden files # defaults write com.apple.finder AppleShowAllFiles -bool true # Show path bar # defaults write com.apple.finder ShowPathbar -bool true # Restart Finder to apply changes # killall Finder
- Example commands (often found in
- Keyboard Shortcuts/Remapping: Tools like Karabiner-Elements might be used for advanced keyboard customization (if included in your setup).
- Spotlight: Useful for launching applications and finding files (
Cmd+Space). - System Updates:
sudo softwareupdate -i -a
Linux (Ubuntu Focus)#
- Package Manager:
aptis the system package manager. Linuxbrew might also be used for user-space packages. - Shell: Zsh, configured via
oh-my-zshandoh-my-posh(seedocs/terminal-usage.md). - System Updates:
sudo apt update && sudo apt upgrade -y sudo apt autoremove -y # To remove unused packages - Firewall:
ufw(Uncomplicated Firewall) is commonly used.# sudo ufw status # sudo ufw enable # sudo ufw allow ssh
Windows (via WSL - Windows Subsystem for Linux)#
- WSL Version: It's recommended to use WSL 2 for better performance and system call compatibility.
- Distribution: Typically Ubuntu is used within WSL, so many Linux notes apply.
- Accessing Windows Files: Windows drives are typically mounted under
/mnt/(e.g.,/mnt/c). - Windows Terminal: Recommended for a better WSL experience.
- Interoperability: You can run Windows executables from WSL and Linux executables from Windows (PowerShell/CMD).
- Docker Desktop with WSL Backend: Often used for Docker development on Windows.
GitHub Codespaces#
GitHub Codespaces typically run a Linux environment (often Ubuntu-based).
- Dotfiles Integration: Your dotfiles can be automatically installed into Codespaces if configured in your GitHub settings.
devcontainer.json: Projects can define specific configurations for Codespaces using adevcontainer.jsonfile, which can include features, extensions, and post-create commands.- The environment is largely Linux-based, so Linux configurations from your dotfiles will apply.
Resources#
- macOS User Guide: https://support.apple.com/guide/mac-help/welcome/mac
- Ubuntu Server Guide / Desktop Guide: https://ubuntu.com/server/docs, https://ubuntu.com/desktop/docs
- Windows Subsystem for Linux (WSL) Documentation: https://docs.microsoft.com/en-us/windows/wsl/
- Chezmoi Documentation (OS specific logic): https://www.chezmoi.io/user-guide/templating/#variables
- Homebrew: https://brew.sh/
- Linuxbrew: https://docs.brew.sh/Homebrew-on-Linux
This document provides a high-level overview. Specific configurations and scripts are managed by chezmoi and can be found within the repository.