How disguisedpigeon/nixos-dotfiles works
Main Components
• Flake Definition: Represented by flake.nix and the accompanying files (flake.lock, overlays, and pkgs). This is the central piece that ties together your package sources, overlays, and configuration modules.
• Host/System Configurations: Found under the “host” directory. This includes machine-specific configurations (like configuration.nix, hardware-configuration.nix) and additional modules (in host/modules) that define graphical environments (awesomewm, hyprland, etc.), device settings, and general system setup.
• Home/User Configurations: Located in the “home” directory. This contains both machine-specific home configurations (e.g. DPigeon-MacOS/dpigeon and DPigeon-MacOS/test) managed via home-manager, as well as “common” home configurations that cover general user preferences (Neovim, zsh, rofi, etc.).
• Overlays and Packages: The “overlays” and “pkgs” directories offer customized package definitions and modifications, allowing the project to extend or override standard Nix packages.
Relationships and Interactions
• The Flake Definition is the entry point that gathers channels and references all the configurations. It “connects” to host and home configurations.
• Host configurations are applied to actual machines (DPigeon-MacOS, DPigeon-RasPI). They incorporate specific modules from “host/modules” which act just like Nix modules enabled for specific setups.
• Home configurations are deployed using home-manager. Note that “common” configurations serve as shared modules across multiple user setups. They are integrated with machine-specific home configurations (dpigeon vs. test) layers.
• Overlays are injected into the package system to customize behaviors or add new packages, which then feed into both host and home setups.
Architectural and Design Patterns
• Modular Configuration: The separation between host modules and common (user) configurations shows a clean modular structure for reusability and selective enablement by machine. This pattern is similar to plug-in architectures.
• Declarative Infrastructure: By using flakes and NixOS’s declarative model, every aspect of the system configuration is version-controlled and reproducible.
• Separation of Concerns: There is a clear division between system-wide configurations (host directory) and personal/home configurations, encouraging role separation (administrator vs. user settings) that fits the typical full-stack style of system administration.
Special Note on Host Modules and Common Configurations
• According to the additional instructions, host modules (in the “host/modules” folder) and common configurations (in “home/common”) serve the same purpose as general Nix modules that will be enabled by explicit configurations—for example, DPigeon-RasPI and DPigeon-MacOS for hosts, and dpigeon/test for home configurations.