How nanamiiiii/dotfiles works
Main Components
• Repository Core – the central dotfiles repository that contains all configuration files.
• Nix-based Configuration Cluster – this includes directories like home-manager, nix-darwin, nix-wsl, and nixos. These parts together define your system integration for NixOS and related distributions. Within this cluster, further distinguish:
• Home-manager: user-level configurations for various applications.
• NixOS/nix-darwin/nix-wsl: system-level settings and packages.
• Profiles: different profiles for various users or machines (e.g., asu, mafu, rika, saki, yuki, etc.).
• Overlays and packages: custom packages or modifications applied on top of the standard Nix packages.
• Non-Nix Configuration Cluster – this includes configurations and tools such as:
• aqua: a tool with its own configuration file (aqua.yaml) and associated checksum file.
• sheldon: plugin configurations for the shell.
• The extensive "config" directory: contains configurations for window managers (i3, hypr, sway, etc.), terminal emulators, fonts, display managers, and various utility scripts.
Relationships and Interactions
• The dotfiles repository acts as the single source of truth.
• In the Nix-based cluster, the various Nix configuration files (in directories like nixos, home-manager, nix-darwin) are applied through the Nix build and deployment system. This is accomplished by integrating the profiles and overlays, which in turn, pull in and manage the configuration details for different systems (desktop, WSL, etc.).
• The non-Nix configurations are applied manually or through lightweight deployment scripts. They define the settings for individual applications and utilities.
• Although these clusters function separately, they are all maintained within one repository to standardize and simplify configuration management.
Architectural Patterns and Design Principles
• Modularity: the repository is broken down into logical modules (e.g., home-manager, nix-darwin, config, profiles). Each module is self-contained and tailored to a specific component.
• Separation of Concerns: clearly divide Nix-based system configurations from non-Nix configurations.
• Hierarchical Organization: within directories like “config” or “home-manager”, configurations are organized by application or function (e.g., window managers, terminals, multimedia, etc.), which simplifies updates and maintenance.
Relevant Technologies and Frameworks
• Nix/NixOS – deep integration for system configuration, with dedicated directories for OS-level settings and home-manager for user-level configurations.
• Profiles and Overlays – used for customization and managing differences between various system setups.
• Aqua and Sheldon – separate non-Nix tools used to manage additional aspects of system configuration (such as checksum verifications with aqua and shell plugin management with sheldon).
• Various Unix/Linux utilities and scripts (e.g., Makefile, shell scripts) that automate parts of the deployment and customization process.