Sorry, I changed the name and reposted it. I’ve been using this for my own machines and thought I’d share it.
The idea is simple: define modules with options, define nodes that enable those modules. Everything in your flake directory gets auto-imported.
You can customize the options for nixpkgs. A machine can be defined using only one file. There are no potential dependencies. Imports are flexible based on the enable switch.
Built-in commands:
nix run .#allOptions # list all modules and options
nix run .#allNodes # list all nodes and enabled modules
nix run .#checkOptions # check all options have default values
Works with darwin and home-manager by defining custom targets. Modules can reference other nodes via the nodes argument. There’s also a rules option for custom assertions.
For example, with my configuration: GitHub - anialic/flakes