Remove generated committed code, update
This commit is contained in:
parent
50bf4fe6c5
commit
3ac9c63a01
9 changed files with 37 additions and 1359 deletions
|
@ -4,3 +4,4 @@ version: 'master'
|
||||||
nav:
|
nav:
|
||||||
- modules/ROOT/nav.adoc
|
- modules/ROOT/nav.adoc
|
||||||
- modules/reference/nav.adoc
|
- modules/reference/nav.adoc
|
||||||
|
nix: true
|
||||||
|
|
|
@ -1,20 +1,31 @@
|
||||||
{
|
{
|
||||||
perSystem = { config, pkgs, ... }:
|
perSystem = { config, pkgs, lib, ... }: {
|
||||||
let
|
packages.generated-option-doc-arion =
|
||||||
doc-options = import ./options.nix { };
|
# TODO: use the render pipeline in flake-parts,
|
||||||
|
# which has support for things like {options}`foo`.
|
||||||
|
let
|
||||||
|
eval = lib.evalModules {
|
||||||
|
modules = import ../src/nix/modules.nix;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
(pkgs.nixosOptionsDoc
|
||||||
|
{
|
||||||
|
options = eval.options;
|
||||||
|
}).optionsCommonMark;
|
||||||
|
|
||||||
in
|
packages.generated-antora-files =
|
||||||
{
|
pkgs.runCommand "generated-antora-files"
|
||||||
packages.doc-options = pkgs.callPackage ./options.nix { };
|
{
|
||||||
|
nativeBuildInputs = [ pkgs.pandoc ];
|
||||||
checks.doc-options = pkgs.runCommand "doc-options-check" { } ''
|
doc_arion = config.packages.generated-option-doc-arion;
|
||||||
if diff --color -u ${./modules/ROOT/partials/NixOSOptions.adoc} ${config.packages.doc-options}; then
|
}
|
||||||
touch $out
|
# TODO: use the render pipeline in flake-parts,
|
||||||
else
|
# which has support for things like {options}`foo`.
|
||||||
echo 1>&2 "The doc options have changed and need to be added."
|
''
|
||||||
echo 1>&2 "Please run ./update-options in the root of your arion clone."
|
mkdir -p $out/modules/ROOT/partials
|
||||||
exit 1
|
pandoc --from=markdown --to=asciidoc \
|
||||||
fi
|
< $doc_arion \
|
||||||
'';
|
> $out/modules/ROOT/partials/arion-options.adoc
|
||||||
};
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
// To update option descriptions
|
include::partial$arion-options.adoc[]
|
||||||
// - use git grep or github search
|
|
||||||
// - or browse through src/nix/modules
|
|
||||||
|
|
||||||
include::partial$NixOSOptions.adoc[]
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -37,16 +37,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669980218,
|
"lastModified": 1673450908,
|
||||||
"narHash": "sha256-HBK1tIqarj7ZsSwQEKGlyvbAIFnglytG7FxuS4K3nY8=",
|
"narHash": "sha256-b8em+kwrNtnB7gR8SyVf6WuTyQ+6tHS6dzt9D9wgKF0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "da7988fe440ef5b8779d4f76340ad7dc79ff3b33",
|
"rev": "6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "haskell-updates",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
description = "Arion - use Docker Compose via Nix";
|
description = "Arion - use Docker Compose via Nix";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/haskell-updates";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
haskell-flake.url = "github:srid/haskell-flake";
|
haskell-flake.url = "github:srid/haskell-flake";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{ lib }:
|
{ lib }:
|
||||||
let
|
let
|
||||||
|
|
||||||
link = url: text:
|
link = url: text: ''[${text}](${url})'';
|
||||||
''link:${url}[${text}]'';
|
|
||||||
|
|
||||||
dockerComposeRef = fragment:
|
dockerComposeRef = fragment:
|
||||||
''See ${link "https://docs.docker.com/compose/compose-file/#${fragment}" "Docker Compose#${fragment}"}'';
|
''See ${link "https://docs.docker.com/compose/compose-file/#${fragment}" "Docker Compose#${fragment}"}'';
|
||||||
|
|
|
@ -3,7 +3,7 @@ let
|
||||||
inherit (lib) types mkOption;
|
inherit (lib) types mkOption;
|
||||||
|
|
||||||
link = url: text:
|
link = url: text:
|
||||||
''link:${url}[${text}]'';
|
''[${text}](${url})'';
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/env nix-shell
|
|
||||||
#!nix-shell -i bash -p jq
|
|
||||||
|
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
cd "$(dirname ${BASH_SOURCE[0]})"
|
|
||||||
|
|
||||||
doc_options="$(nix build .#doc-options --json | jq -r .[].outputs.out)"
|
|
||||||
cat "$doc_options" >docs/modules/ROOT/partials/NixOSOptions.adoc
|
|
Loading…
Reference in a new issue