mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 17:54:53 +01:00
24 lines
384 B
Markdown
24 lines
384 B
Markdown
# Importing Modules {#sec-importing-modules}
|
|
|
|
Sometimes NixOS modules need to be used in configuration but exist
|
|
outside of Nixpkgs. These modules can be imported:
|
|
|
|
```nix
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
# Use a locally-available module definition in
|
|
# ./example-module/default.nix
|
|
./example-module
|
|
];
|
|
|
|
services.exampleModule.enable = true;
|
|
}
|
|
```
|