mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 05:02:10 -08:00
27 lines
497 B
Nix
27 lines
497 B
Nix
{
|
|
lib,
|
|
runCommand,
|
|
nixosOptionsDoc,
|
|
neovim,
|
|
...
|
|
}:
|
|
let
|
|
# evaluate our options
|
|
eval = lib.evalModules {
|
|
modules = [ ../modules/default.nix ];
|
|
check = false;
|
|
specialArgs = {
|
|
pkgs = {
|
|
inherit neovim;
|
|
};
|
|
};
|
|
};
|
|
# generate our docs
|
|
optionsDoc = nixosOptionsDoc {
|
|
inherit (eval) options;
|
|
};
|
|
in
|
|
# create a derivation for capturing the markdown output
|
|
runCommand "options-doc.md" { } ''
|
|
tail -n +64 ${optionsDoc.optionsCommonMark} >> $out
|
|
''
|