All deployable NixOS configurations can be found in the flake.nix.
Use nix flake show to display them.
Each NixOS configuration exposed in the flake.nix assembles different configuration files from different directories together.
The directories contain configuration files for affecting different aspects of the system:
- The
machinesdirectory contains hardware specific configuration files for the different target hosts - The
dotfilesdirectory contains home-manager configuration files affecting a specific user - The
environmentsdirectory contains NixOS system configuration files that assemble configurations from theservices, andoptionsdepending on the use of the final system.
In the following sections I describe what each subdirectory contains.
The machines directory contains a subdirectory for every physical machine running NixOS.
Each of those machine directories contains
- the generated
hardware-configuration.nix - hardware specific configuration files like
bluetooth.nixandnetworking.nix
The dotfiles directory contains configurations for user applications and services like nvim, git, etc.. It also contains the following files which assmble these configurations depending on the use of the final system.
common.nixunifies all user application configurations that can be used on any machine.desktop.nixunifies all user application configurations that can be used on machines with a desktop.work.nixcontains user applications that are only used for work.
The environments directory contains NixOS system configuration files that assemble configurations from the services, and options depending on the use of the final system:
common.nixunifies all system configuration files that can be used on any machine.desktop.nixunifies all system configurations that can be used on machines with a desktop.work.nixcontains system configurations that are only used for work.
This directory contains all system configurations which are not services.
This directory contains all system service configurations.