NixOS modules: Difference between revisions
imported>Milahu add section modulesPath |
imported>Montchr Replace example of obsolete `require` option with `imports` |
||
Line 27: | Line 27: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ | { | ||
imports = [ | |||
# paths to other modules | # paths to other modules | ||
./module.nix | |||
/path/to/absolute/module.nix | |||
]; | ]; | ||
Line 37: | Line 37: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note: <code>require</code> | Note: <code>imports</code> provides the same behavior as the obsolete <code>require</code>. There is no reason to use <code>require</code> anymore, however it may still linger in some legacy code. . | ||
=== Function === | === Function === |