Anthony Rodriguez
bb55875491
The idea of this refactor is, as the configuration is getting bigger and more complex, to move everything into a local modules system. The idea is to simplify hosts declaration and add a new layer of abstraction to avoid the long and redundant imports in hosts/default.nix, that I am currently using. First, we're going to move everything to the modules directory, and split options from the proper configuration. That allows us to have an easier time understanding how the options are structured, as they will follow the directory structure and won't be mixed with the module configuration. |
||
---|---|---|
.. | ||
anastacia | ||
solaire | ||
vamos | ||
default.nix | ||
README.md |
💻 Hosts
This directory contains the entry points for different NixOS system configurations. Each host represents a complete system configuration, combining NixOS system settings and Home Manager configurations.
Components
default.nix
The default.nix
file in each host directory serves as the main entry point for the system configuration. It:
- Sets up NixOS configurations
- Sets up Home Manager configurations
- References host-specific module declarations
modules/
The modules/
directory contains host-specific declarations for custom modules that are defined in the flake's nixosModules
output. This so far only includes global theme / style related declarations.
Adding a New Host
- Create a new directory for the host
- Add a
hardware-configuration.nix
generated withnixos-generate-config
- Add a
default.nix
that imports the desired configurations - Create host-specific module declarations in the
modules/
subdirectory to customize the global modules as needed - Reference the new host in
hosts/default.nix