My personal configuration files and setup scripts for macOS and Linux (Ubuntu/Mint).
- Automated setup for common development tools and applications.
- Configuration for shells (Bash), editors, and various utilities.
- Uses
asdffor managing runtime versions (Node.js, Python, Go, Java, etc.). - Uses Homebrew on macOS and APT on Debian/Ubuntu for package management.
- Package definitions managed centrally in
shared/packages.json. - Idempotent installation scripts (safe to re-run).
- Centralized logging using
shared/log_utils.sh. - Virtualization tools setup (QEMU/KVM, libvirt, virt-manager).
Warning: Review the scripts and shared/packages.json before running to understand what will be installed and configured.
Run this command in your terminal. It downloads and executes the main installation script:
bash <(wget -qO- https://raw.githubusercontent.com/mjgil/dotfiles/master/linux/install.sh)This method downloads all necessary scripts to a temporary directory and executes them.
- Clone the repository:
git clone https://github.com/mjgil/dotfiles.git ~/git/dotfiles
cd ~/git/dotfiles- Run the local installation script:
./install-local.sh- Clone the repository:
git clone https://github.com/mjgil/dotfiles.git ~/git/dotfiles
cd ~/git/dotfiles- Run the macOS installation script:
./mac/install-mac.shThis script will:
- Install Xcode Command Line Tools if missing.
- Install Rosetta on Apple Silicon if missing.
- Install Homebrew if missing.
- Install packages defined in
shared/packages.jsonvia Homebrew. - Run Mac-specific setup (
mac/install-programs-and-apps.sh,mac/install-defaults.sh,mac/update-bashrc.sh).
linux/: Linux-specific scripts and configuration.mac/: macOS-specific scripts and configuration.shared/: Scripts and configuration shared between platforms.packages.json: Central definition of packages to install.install-packages.sh: Script to parsepackages.jsonand install packages using the appropriate package manager (APT/Brew/Snap/ASDF).log_utils.sh: Centralized logging functions.create-package-blockers.sh&install-apt-hooks.sh: Scripts to set up APT hooks for ASDF protection (Linux).- ... other shared utilities ...
install-local.sh: Main script for installing from a local clone (primarily for Linux).
Certain language runtimes (like Node.js, Python, Go, Java, etc., as defined in packages.json) are managed exclusively via asdf-vm. To prevent accidental installation of system versions of these runtimes via apt (which could lead to conflicts), APT hooks are automatically installed on Linux.
- How it works: Scripts (
create-package-blockers.shandinstall-apt-hooks.sh) configure APT to run a check before installing packages. - Protection: If you try to
sudo apt install <package-managed-by-asdf>, the hook will detect it and cause theaptcommand to fail for that specific package, preventing the installation. - Non-Interactive: This protection is automatic and does not prompt the user. It simply prevents the conflicting installation directly.
- Bypassing (Use with Caution): If you absolutely need to install a system version managed by ASDF, you would need to temporarily remove or disable the APT hook configuration file located in
/etc/apt/apt.conf.d/.
All packages are defined in shared/packages.yml and organized by category. To install a specific category of packages:
./shared/install-packages.sh developmentTo check which packages are installed:
./check-installed.shOn Linux systems, this dotfiles setup includes configuration for QEMU/KVM virtualization:
- Installs QEMU, libvirt, and virt-manager packages
- Adds the user to the libvirt and kvm groups for proper permissions
- Starts and enables the libvirtd service
After installation, you may need to log out and back in for group changes to take effect. Then you can create and manage virtual machines using the virt-manager application.