| Commit message (Expand) | Author | Age | Files | Lines |
| * | lib/modules: add `class` to `specialArgs`•••Co-Authored-By: Johannes Kirschbauer <hsjobeki@gmail.com>
| Michael Hoang | 2025-04-10 | 1 | -0/+1 |
| * | lib.modules: init test for lib.mkDefinition | Johannes Kirschbauer | 2025-04-03 | 1 | -2/+0 |
| * | lib.modules: init lib.mkDefinition•••Free-floating definitions including file location.
| Robert Hensing | 2025-04-03 | 1 | -4/+18 |
| * | treewide: Format all Nix files•••Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
| Silvan Mosberger | 2025-04-01 | 1 | -683/+916 |
| * | lib.modules: simplified logic in zipAttrsWith and minor cleanup | toborwinner | 2025-03-10 | 1 | -7/+5 |
| * | Docs: migrate format of comments to doc-comments | Johannes Kirschbauer | 2025-02-12 | 1 | -173/+418 |
| * | lib/modules: improve mismatching class error mesage | Johannes Kirschbauer | 2025-01-29 | 1 | -1/+8 |
| * | Revert "pkgs/top-level: make package sets composable" | K900 | 2025-01-26 | 1 | -2/+0 |
| * | nixos/nixpkgs: pass original system args instead of elaborated•••Passing the elaborated system defeats what pkgs/top-level/default.nix
tries to do: Pass only the original args and let defaults be inferred.
The underlying problem is that lib.systems.elaborate can not deal with
arbitrary overrides, but will often return an inconsistent system
description when partially overriding some values. This becomes most
prominent if trying to override an already elaborated system.
| Wolfgang Walther | 2025-01-25 | 1 | -0/+2 |
| * | lib.collectModules: improve readability by replacing implication | Johannes Kirschbauer | 2024-12-31 | 1 | -1/+1 |
| * | lib/modules: Minor performance optimisation•••Co-Authored-By: Johannes Kirschbauer <hsjobeki@gmail.com>
| Silvan Mosberger | 2024-12-03 | 1 | -12/+19 |
| * | lib/types: Add deprecation to attrsWith•••Co-Authored-By: @infinisil
| Silvan Mosberger | 2024-12-03 | 1 | -3/+26 |
| * | Revert "lib/types: init {types.attrsWith}" | K900 | 2024-12-03 | 1 | -35/+5 |
| * | lib/modules: Minor performance optimisation•••Co-Authored-By: Johannes Kirschbauer <hsjobeki@gmail.com>
| Silvan Mosberger | 2024-12-02 | 1 | -12/+19 |
| * | lib/types: Add deprecation to attrsWith•••Co-Authored-By: @infinisil
| Silvan Mosberger | 2024-11-26 | 1 | -3/+26 |
| * | treewide: lib.isInOldestRelease -> lib.oldestSupportedReleaseIsAtLeast | Robert Hensing | 2024-10-08 | 1 | -4/+4 |
| * | lib/modules: Improve error when loading a flake as a module | Robert Hensing | 2024-09-26 | 1 | -6/+105 |
| * | lib/modules: improve error message when option is being accessed that isn't d... | Robert Hensing | 2024-09-02 | 1 | -1/+1 |
| |\ |
|
| | * | lib/modules: improve error message when option is being accessed that isn't d... | Sandro Jäckel | 2024-09-01 | 1 | -1/+1 |
| * | | lib.importApply: init (#230588)•••* lib.modules.importApply: init
Brings variables from rich scopes to modules defined in separate files.
A helper for functions in files that return a module.
* lib.modules.importApply: Edit doc
Generally improve the quality. Notes:
- Not rendered to the manual yet, so probably the syntax could be
improved, but I have no way to test this now.
- The docs use `arg` vs `staticArg` in the code. This is intentional,
because the doc is pretty clear about the role of `arg` whereas
the code exists in a context where ambiguities are more harmful.
* Format | Robert Hensing | 2024-08-31 | 1 | -0/+53 |
| |/ |
|
| * | lib/modules: Memoize remaining lookups into builtins•••Similar to the previous commit about lookups into lib
Main benefits
- consistent
- faster
- shorter
| Robert Hensing | 2024-07-03 | 1 | -11/+17 |
| * | lib/modules: Memoize remaining lookups into lib•••Benefits:
- some lookups happened in the hot path, and will now be slightly faster,
with only a variable lookup and no attribute selection
- it's now harder to accidentally use args.lib aka specialArgs.lib, which
has happened
- shorter
| Robert Hensing | 2024-07-03 | 1 | -21/+25 |
| * | lib/modules: Memoize functionArgs lookup•••This would also make specialArgs-lib.nix pass.
| Robert Hensing | 2024-07-03 | 1 | -1/+2 |
| * | lib/modules: Memoize addErrorContext lookup | Robert Hensing | 2024-07-03 | 1 | -6/+7 |
| * | lib/modules: Use fixed lib instead of args.lib•••The practical use for this should be very limited because I don't
think anyone should change `lib`, let alone change `lib.functionArgs`,
but, but it would be even stranger to rely on `args.lib` (or really
`specialArgs.lib` for what's clearly a behavior of the current
`evalModules`, which uses its own ambient lib for basically everything.
The shadowing of `lib` by `args.lib` here seems to be a small mistake,
which is easy to make.
| Robert Hensing | 2024-07-03 | 1 | -2/+2 |
| * | lib: remove all uses of lib.mdDoc•••this change is otherwise a no-op, as lib.mdDoc is already defined to be
the identity function.
| stuebinm | 2024-04-13 | 1 | -4/+4 |
| * | Merge pull request #284551 from hercules-ci/types-attrTag•••Add `types.attrTag` | Silvan Mosberger | 2024-04-09 | 1 | -1/+1 |
| |\ |
|
| | * | lib.modules.evalOptionValue: Undeprecate for lib.types•••lib.types.attrTag needs it.
| Robert Hensing | 2024-04-04 | 1 | -1/+1 |
| * | | Merge pull request #286544 from hercules-ci/doRename-doc•••lib.modules.doRename: Add doc comments | Valentin Gagarin | 2024-02-22 | 1 | -1/+72 |
| |\ \ |
|
| | * | | lib.modules.doRename: Add doc comments•••I don't think these are rendered yet, but this at least provides
the content.
Follow-up to https://github.com/NixOS/nixpkgs/pull/285612
| Robert Hensing | 2024-02-14 | 1 | -1/+72 |
| | |/ |
|
| * / | lib.evalModules: Fix deprecation doc for args parameter | Benoit de Chezelles | 2024-02-18 | 1 | -2/+2 |
| |/ |
|
| * | lib.modules.doRename: Add condition parameter•••This is to support single-to-multi service migrations, so that the
`to` (e.g. `foos.""`) isn't defined unconditionally. See test cases.
| Robert Hensing | 2024-02-02 | 1 | -3/+3 |
| * | lib/modules: Test optionless module errors from #131205 | Robert Hensing | 2023-12-09 | 1 | -0/+2 |
| * | Merge pull request #249243 from lf-/jade/declarationsWithLocations•••nixos/modules: Add declarationPositions | Robert Hensing | 2023-09-17 | 1 | -4/+11 |
| |\ |
|
| | * | nixos/modules: Add declarationPositions•••What it does: line and column level *declaration* position information:
$ nix repl .
nix-repl> :p nixosConfigurations.micro.options.environment.systemPackages.declarationPositions
[ { column = 7; file = "/nix/store/24aj3k7fgqv3ly7qkbf98qvphasrw9nb-source/nixos/modules/config/system-path.nix"; line = 63; } ]
Use cases:
- ctags over NixOS options, as will be presented at NixCon 2023 ;)
- improving the documentation pages to go to the exact line of the
declarations.
Related work:
- https://github.com/NixOS/nixpkgs/pull/65024
This one does it for all *definitions* rather than declarations, and
it was not followed through with due to performance worries.
- https://github.com/NixOS/nixpkgs/pull/208173
The basis for this change. This change is just a rebase of that one.
I split it out to add the capability before adding users of it, in
order to simplify review. However, the ctags script in there is a
sample user of this feature.
Benchmarks: conducted by evaluating my own reasonably complex NixOS
configuration with the command:
`hyperfine -S none -w 1 -- "nix eval .#nixosConfigurations.snowflake.config.system.build.toplevel.outPath"`
```
Benchmark 1: nix eval .#nixosConfigurations.snowflake.config.system.build.toplevel.outPath
Time (mean ± σ): 8.971 s ± 0.254 s [User: 5.872 s, System: 1.388 s]
Range (min … max): 8.574 s … 9.327 s 10 runs
Benchmark 1: nix eval .#nixosConfigurations.snowflake.config.system.build.toplevel.outPath
Time (mean ± σ): 8.766 s ± 0.160 s [User: 5.873 s, System: 1.346 s]
Range (min … max): 8.496 s … 9.033 s 10 runs
```
Summary of results: it seems to be in the noise, this does not cause any
visible regression in times.
| Jade Lovelace | 2023-09-08 | 1 | -4/+11 |
| * | | lib/modules: Report a better error when option tree has bare type•••Improves on 0d472a62012364d064f0b75f1da491242c6ae9c6
- https://github.com/NixOS/nixpkgs/pull/242339
We actually do have the file name.
Thanks Shawn8901 for the [feedback]!
feedback: https://github.com/NixOS/nixpkgs/pull/242339#issuecomment-1683107055
| Robert Hensing | 2023-08-18 | 1 | -3/+3 |
| * | | lib/modules: Report a good error when option tree has bare type•••Note that this removes the possibility of declaring an option
named `_type`.
| Robert Hensing | 2023-08-14 | 1 | -1/+33 |
| |/ |
|
| * | Merge pull request #245271 from sternenseemann/module-system-merge-no-type•••lib/modules: handle typeless options in mergeModules | Robert Hensing | 2023-07-27 | 1 | -1/+1 |
| |\ |
|
| | * | 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.
| sternenseemann | 2023-07-26 | 1 | -1/+1 |
| * | | lib.mergeModules: Add context to error message | Robert Hensing | 2023-07-11 | 1 | -1/+4 |
| * | | lib/modules.nix: Format | Robert Hensing | 2023-07-11 | 1 | -19/+28 |
| * | | lib/modules.nix: Inline single-use `subtree` bindings | Robert Hensing | 2023-07-11 | 1 | -4/+4 |
| * | | lib/modules.nix: Make entire definition list strict in config check•••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.
| Robert Hensing | 2023-07-11 | 1 | -24/+21 |
| * | | lib/modules.nix: Rename defnsByName -> pushedDownDefinitionsByName | Robert Hensing | 2023-07-11 | 1 | -2/+2 |
| * | | lib/modules.nix: Rename defnsByName' -> rawDefinitionsByName | Robert Hensing | 2023-07-11 | 1 | -3/+3 |
| * | | lib/modules.nix: Apply argument `module` of old f | Robert Hensing | 2023-07-11 | 1 | -9/+9 |
| * | | lib/modules.nix: Apply argument `modules` of old old old byName | Robert Hensing | 2023-07-11 | 1 | -6/+6 |
| * | | lib/modules.nix: Apply argument `f` of old old byName | Robert Hensing | 2023-07-11 | 1 | -15/+21 |
| * | | lib/modules.nix: Apply argument `attr` of old byName | Robert Hensing | 2023-07-11 | 1 | -31/+15 |
| * | | lib/modules.nix: Inline byName•••byName is not an abstraction. This is the first commit in a series
that refactors it away.
| Robert Hensing | 2023-07-11 | 1 | -27/+43 |
| |/ |
|