NixOS Module System | 160 Members | |
| 30 Servers |
| Sender | Message | Time |
|---|---|---|
| 16 May 2025 | ||
| I never acquainted with
| 19:49:57 | |
| I believe the issue is the
| 19:52:25 | |
Some of the "container types" don't really check what's inside before being evaluated at a later stage. I believe this is the case for submodules, listOf and attrsOf. As a hack, you can add those checks with lib.types.addCheck. Same scenario with either and oneOf. | 19:53:46 | |
It's intentional that the submodule-type's check function is not very restrictive, since you can assign any module to a submodule and it is down to the submodule's configuration to evaluate and merge its own definitions internally. | 19:53:58 | |
E.g. foo = {} is a vaild definition, as is foo = { config, ... }: { }, as is foo = ./someModule.nix | 19:54:55 | |