Skip to content

Replace 'configurationsXyz' and 'modulesXyz' with 'configurations.xyz' and 'modules.xyz' #6257

@gytis-ivaskevicius

Description

@gytis-ivaskevicius

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:

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions