mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 09:36:20 +09:00
nixos/eval-config: Deprecate NIXOS_EXTRA_MODULE_PATH (#349549)
This commit is contained in:
commit
04a5fd4b4f
3 changed files with 24 additions and 31 deletions
|
@ -16,31 +16,3 @@ outside of Nixpkgs. These modules can be imported:
|
|||
services.exampleModule.enable = true;
|
||||
}
|
||||
```
|
||||
|
||||
The environment variable `NIXOS_EXTRA_MODULE_PATH` is an absolute path
|
||||
to a NixOS module that is included alongside the Nixpkgs NixOS modules.
|
||||
Like any NixOS module, this module can import additional modules:
|
||||
|
||||
```nix
|
||||
# ./module-list/default.nix
|
||||
[
|
||||
./example-module1
|
||||
./example-module2
|
||||
]
|
||||
```
|
||||
|
||||
```nix
|
||||
# ./extra-module/default.nix
|
||||
{ imports = import ./module-list.nix; }
|
||||
```
|
||||
|
||||
```nix
|
||||
# NIXOS_EXTRA_MODULE_PATH=/absolute/path/to/extra-module
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# No `imports` needed
|
||||
|
||||
services.exampleModule1.enable = true;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -45,7 +45,7 @@ file.
|
|||
- `buildDocsInSandbox` indicates whether the option documentation for the
|
||||
module can be built in a derivation sandbox. This option is currently only
|
||||
honored for modules shipped by nixpkgs. User modules and modules taken from
|
||||
`NIXOS_EXTRA_MODULE_PATH` are always built outside of the sandbox, as has
|
||||
`extraModules` are always built outside of the sandbox, as has
|
||||
been the case in previous releases.
|
||||
|
||||
Building NixOS option documentation in a sandbox allows caching of the built
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue