How carlosmed/dotfiles works
Main Components
• Installation Scripts: A central install script (setup.sh in the root and further OS-specific scripts under installs like arch.sh, mac.sh) is responsible for initializing the process.
• Package Directories: The “packages” folder is subdivided into “common,” “linux,” and “mac” directories. The “common” folder contains configurations that apply across systems (e.g., Vim, Zsh, Neovim, polybar, rofi, etc.), whereas the OS-specific folders have configurations or packages unique to that system.
• GNU Stow Integration: The system relies on GNU Stow to create symlinks from these configuration directories to their appropriate target locations on the user’s system.
• Supporting Files: There are additional configuration files such as .gitignore, .stowrc, and documentation (README.md, arch_install.md) that support version control or environment configuration.
Relationships and Interactions
• The “setup.sh” script acts as the entry point. When executed, it invokes the OS-specific install scripts (via conditional logic or user selection).
• Next, the user navigates into a particular package (common, linux, mac) and runs GNU Stow with the “-t” target parameter. This creates symlinks from the repository’s config files to the designated locations (e.g., home directories, application config folders).
Important Architectural Patterns and Design Principles
• Modularity: Separation of configuration files by OS and by common/shared files facilitates reuse and easier maintenance.
• Declarative Configuration Management: Rather than rewriting configuration files on every install, WIMILI uses symlink management (via GNU Stow) to automate and simplify the process.
• Script-Driven Automation: The repository contains scripts for installation across different platforms, providing a uniform mechanism to set up and integrate multiple tools (brew, oh-my-zsh, etc.).
Incorporate Relevant Technologies/Frameworks/Libraries
• GNU Stow is at the heart of the configuration deployment.
• Shell scripting plays a central role (with scripts written in Bash).
Essential Elements
• Clear labels for components: “Install Scripts,” “Common Configs,” “Mac Configs,” “Linux Configs,” “GNU Stow,” and “Target System.”
• Functional components (scripts, package directories);
• Process or workflow actions (installation, symlink deployment);
• External dependencies (tools installed on the user’s OS like Homebrew, oh-my-zsh).
• Since the project supports multiple platforms, clearly differentiate the “Linux” and “Mac” configuration paths versus the shared “Common” configuration path.
1. At the top is the “Setup” layer (install scripts and initialization).
2. The middle layer outlines the configuration packages (common and OS-specific) and shows GNU Stow’s pivotal role.
3. At the bottom layer, illustrate the final state on the user’s system where configuration files are symlinked into their respective locations.