From aa8e663b6e6f6e0c47000ab509cbe7e0f35a8aad Mon Sep 17 00:00:00 2001 From: Eric Sagnes Date: Mon, 29 Aug 2016 16:54:25 +0900 Subject: nixos doc: add modules meta-attributes (#18078) --- nixos/doc/manual/development/meta-attributes.xml | 62 ++++++++++++++++++++++++ nixos/doc/manual/development/writing-modules.xml | 1 + 2 files changed, 63 insertions(+) create mode 100644 nixos/doc/manual/development/meta-attributes.xml (limited to 'nixos/doc/manual/development') diff --git a/nixos/doc/manual/development/meta-attributes.xml b/nixos/doc/manual/development/meta-attributes.xml new file mode 100644 index 000000000000..cebd16c2a9d0 --- /dev/null +++ b/nixos/doc/manual/development/meta-attributes.xml @@ -0,0 +1,62 @@ +
+ +Meta-attributes + +Like Nix packages, NixOS modules can declare meta-attributes to provide + extra information. Module meta-attributes are defined in the + meta.nix + special module. + +meta is a top level attribute like + options and config. Available + meta-attributes are maintainers and + doc. + +Each of the meta-attributes must be defined at most once per module + file. + + +{ config, lib, pkgs, ... }: +{ + options = { + ... + }; + + config = { + ... + }; + + meta = { + maintainers = with lib.maintainers; [ ericsagnes ]; + doc = ./default.xml; + }; +} + + + + + + maintainers contains a list of the module maintainers. + + + + + + doc point to a valid docbook file containing the module + documentation, its contents are automatically added to the . + Changes to a module documentation must be checked to be non-breaking by + building the NixOS manual. + + $ nix-build nixos/release.nix -A manual + + + + +
diff --git a/nixos/doc/manual/development/writing-modules.xml b/nixos/doc/manual/development/writing-modules.xml index 971e586f20bd..a68b122ce022 100644 --- a/nixos/doc/manual/development/writing-modules.xml +++ b/nixos/doc/manual/development/writing-modules.xml @@ -177,5 +177,6 @@ in { + -- cgit 1.4.1