1{ pkgs ? import <nixpkgs> {}
5 # Provide a dummy pkg-def for the package set function
15 # Apply the package set function to get NixOS options.
16 inherit (import ../package-set.nix { hackage = null; inherit pkgs pkg-def; }) options;
18 optionsNix = (pkgs.nixosOptionsDoc { inherit options; }).optionsNix;
20 optionsMarkdown = lib.concatStringsSep "\n" (lib.mapAttrsToList singleMarkdown optionsNix);
22 singleMarkdown = name: value: ''
27 **Type**: ${value.type}
29 ${ if lib.hasAttr "default" value
31 **Default**: ${builtins.toJSON value.default}
39 ${ if lib.hasAttr "example" value
43 ${builtins.toJSON value.example}
50in builtins.toFile "options.md" ''
51Haskell.nix modules options for packages and components.
54 This documentation is generated from Nix sources in the
55 [`modules`](https://github.com/input-output-hk/haskell.nix/tree/master/modules)
56 subdirectory using `scripts/update-docs.nix`
58# Configuration Options
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list