NixOS modules: Difference between revisions
imported>Malteneuss m Improve structure and reuse formulations |
imported>Malteneuss m Extend explanation of module syntax structure |
||
Line 10: | Line 10: | ||
{ | { | ||
imports = [ | imports = [ | ||
# | # Paths to other modules. | ||
# Compose this module out of smaller ones. | |||
]; | ]; | ||
options = { | options = { | ||
# option | # Option declarations. | ||
# Declare what settings a user of this module module can set. | |||
# Usually this includes an "enable" option to let a user of this module choose. | |||
}; | }; | ||
config = { | config = { | ||
# option | # Option definitions. | ||
# Define what other settings, services and resources should be active. | |||
# Usually these are depend on whether a user of this module chose to "enable" it | |||
# using the "option" above. | |||
# You also set options here for modules that you imported in "imports". | |||
}; | }; | ||
} | } | ||
Line 48: | Line 55: | ||
{ config, pkgs, ... }: | { config, pkgs, ... }: | ||
{ | { | ||
imports = []; | |||
# ... | # ... | ||
} | } |