-
-
Couldn't load subscription status.
- Fork 1.8k
Description
Simply put - the current approach is just not scalable, we got projects defining custom modules/configurations which are being recognized as 'unknown' due to the lack of a type system.
Some peeps suggest implementing nixpkgs options system or type system via JSON spec but I think the best solution here is to just remove the need for a type system in this case entirely.
Expected properties rename:
nixosConfigurations.hostname = {...} to configurations.nixos.hostname = {...}, so schema would be: configurations.<name>.<hostname> = {...}
nixosModules.moduleName = {...} to modules.nixos.moduleName = {...}, so schema would be: modules.<name>.<moduleName> = {...}
(Similar idea to REST naming convention and existing system-specific properties)
Also, may I add that there is one annoyance current nix flake check implementation:
Line 421 in 895dfc6
| auto vToplevel = findAlongAttrPath(*state, "config.system.build.toplevel", bindings, v).first; |
Alias in nixpkgs should be added so we could replace this line with something like this:
auto vToplevel = findAlongAttrPath(*state, "config.drv", bindings, v).first;