mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
19 lines
384 B
Markdown
19 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;
|
||
|
}
|
||
|
```
|