mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
0abfc619bc
* 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
6 lines
154 B
Nix
6 lines
154 B
Nix
{ lib, ... }:
|
|
{
|
|
options.value = lib.mkOption { default = 1; };
|
|
imports = [ (lib.modules.importApply ./importApply-function.nix { foo = "abc"; }) ];
|
|
}
|