| Commit message (Collapse) | Author | Age |
|\
| |
| | |
lib/modules: handle typeless options in mergeModules
|
| |
| |
| |
| |
| |
| | |
mkOption does not require a `type` argument and does not set the
resulting attribute if it is not given. Consequently, we need to be
prepared to merge options that have no type information.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a non-trivial refactor that slightly changes the semantics
of the internal definition lists.
Whereas previously only individual list items would trigger the exception,
now the error is promoted to the whole list.
This is mostly ok, because we compute the value, it is wrong to ignore a definition.
However, we don't always compute the value. For instance `readOnly`
only needs to count definitions. That won't be possible anymore when
the error is raised for one of the items. As a consequence, an error
will be raised for the errant definition instead of the number of
definitions.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
byName is not an abstraction. This is the first commit in a series
that refactors it away.
|
|\
| |
| |
| |
| | |
hercules-ci/nixos-nixpkgs-dont-check-when-_module.args.pkgs-is-set
`nixos/nixpkgs`: Don't check when `_module.args.pkgs` is set
|
| | |
|
| |
| |
| |
| |
| |
| | |
This will let us make assertions involving _module.args.pkgs, which
is not an option but a value attribute, and therefore doesn't have
its own highestPrio to inspect. The new function gives us that info.
|
| | |
|
| |
| |
| |
| | |
this was a temporary fix that should hopefully no longer be necessary.
|
|/
|
|
|
|
| |
with docbook gone and MD the default these aren't needed any more. we
can't remove them yet because there's thousands of uses, but maybe some
day we can.
|
|
|
|
| |
This simplifies the documentation. `configuration` is implied by `_type`.
|
| |
|
| |
|
| |
|
|
|
|
| |
`file://./..` looks redundant, but makes the url clickable in vscode.
|
|
|
|
|
|
| |
This is to avoid stealing keys from submodules. `class` might be
common enough that reinterpreting existing `class` attributes in
configurations as a declaration leads to fairly widespread problems.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is appears to be a fairly common mistake for beginners who want
to build larger things from the system configurations, such as NixOps
networks, etc. Further explanation seems appropriate.
|
| |
|
|
|
|
|
| |
This improves the error message when an incompatible module is
imported.
|
|
|
|
|
|
|
|
|
| |
The supposedly public nature of these functions has been holding
back module system maintenance, while usages of these functions
are expected to be rare. If used anywhere, presumably they're
emulating module system behavior because some use case isn't supported
properly. We should try to support such a use case directly, if it
even exists.
|
| |
|
|
|
|
|
| |
Make `byName` aware of whether it's processing options or config to give
slightly more accurate error messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the following work
disabledModules = [ foo.nixosModules.bar ];
even if `bar` is not a path, but rather a module such as
{ key = "/path/to/foo#nixosModules.bar"; config = ...; }
By supporting this, the user will often be able to use the same syntax
for both importing and disabling a module. This is becoming more relevant
because flakes promote the use of attributes to reference modules. Not
all of these modules in flake attributes will be identifiable, but with
the help of a framework such as flake-parts, these attributes can be
guaranteed to be identifiable (by outPath + attribute path).
|
|
|
|
|
|
| |
Follow-up to https://github.com/NixOS/nixpkgs/pull/208407
Removing `mdDoc` isn't enough, we need to emit actual DocBook.
|
|
|
|
|
|
| |
unfortunately we can't unconditionally make this text markdown without
impacting downstream users of docs generation (as noted in #175586).
hide it entirely until the transition is complete.
|
|
|
|
|
|
|
| |
mkAliasOptionModule should not default to mdDoc descriptions because
that can break out-of-tree users of documentation infrastructure. add an
explicitly-MD variant for now, to be removed some time after the MD
transition is complete.
|
| |
|
|\
| |
| | |
nixos/doc: document `mkOrder` and friends
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a section on ordering option definitions.
Also mention `mkDefault` in the section on `mkOverride`.
Clarify the code a bit by renaming `defaultPriority` to
`defaultOverridePriority` and introducing `defaultOrderPriority`.
|
|/
|
|
|
|
|
| |
Add trace items that provide context for a failed definition that
can not be caught within the Nix language.
This also adds a test for the `tryEval` behavior of `showDefs`.
|
|
|
|
| |
This fixes mkAliasOptionModule in systems with no warning option.
|
|\
| |
| | |
treewide: clean up
|
| | |
|
|\ \
| |/
|/| |
nixosTest: make modular
|
| | |
|
|/
|
|
|
|
|
|
|
| |
This attr provides the location of each definition.
This is particularly useful for introspecting options of type
`attrsOf`. E.g., it allows finding the location of a systemd
service definition by parsing
`options.systemd.services.definitionsWithLocations`.
|
|\ |
|