arion/docs/flake-module.nix

21 lines
589 B
Nix
Raw Normal View History

2022-12-02 02:21:38 +03:00
{
perSystem = { config, pkgs, ... }:
let
doc-options = import ./options.nix { };
in
{
packages.doc-options = pkgs.callPackage ./options.nix { };
checks.doc-options = pkgs.runCommand "doc-options-check" { } ''
if diff --color -u ${./modules/ROOT/partials/NixOSOptions.adoc} ${config.packages.doc-options}; then
touch $out
else
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."
exit 1
fi
'';
};
}