
Scaling NixOS with "Import All and Enable" Pattern
The default structure of a fresh NixOS installation makes a lot of sense, two files, which are intended to be used as the bases for future changes and represent a single machine with the bare minimum, upon which this first installation is being done. For the sake of consistent language I will call them two high level modules. The problem with "all in one configuration files" The initial installation creates two high level modules, configuration.nix and hardware-configuration.nix but what happens when we want to add zfs configuration or setup home-manger, or maybe declare neovim and emacs. The cohesion of this high level modules gets fuzzier by every such addition. Unrelated configurations get coupled together, Understating where something starts and ends and the ability to change it becomes a nightmare. ...