Improve option docs, update effect

This commit is contained in:
Robert Hensing 2022-05-25 16:19:43 +02:00
parent 13fc0c610b
commit 3ff2098da2
5 changed files with 135 additions and 42 deletions

View file

@ -1,4 +1,4 @@
flakeModuleArgs@{ config, lib, inputs, ... }:
{ config, lib, inputs, ... }:
{
imports = [
@ -28,22 +28,6 @@ flakeModuleArgs@{ config, lib, inputs, ... }:
};
};
packages = {
inherit (pkgs.nixosOptionsDoc { inherit (flakeModuleArgs) options; })
optionsDocBook;
optionsMarkdown = pkgs.runCommand "options-markdown"
{
inherit (config.packages) optionsDocBook;
nativeBuildInputs = [ pkgs.pandoc ];
} ''
mkdir $out
pandoc \
--from docbook \
--to markdown \
--output $out/options.md \
$optionsDocBook
'';
};
};
flake = {
options.herculesCI = lib.mkOption { type = lib.types.raw; };
@ -57,7 +41,7 @@ flakeModuleArgs@{ config, lib, inputs, ... }:
in
{
netlifyDeploy = effects.runIf (branch == "main") (effects.netlifyDeploy {
content = config.flake.packages.x86_64-linux.websitePackage;
content = config.flake.packages.x86_64-linux.siteContent;
secretName = "default-netlify";
siteId = "29a153b1-3698-433c-bc73-62415efb8117";
productionDeployment = true;

11
dev/flake.lock generated
View file

@ -51,15 +51,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1653465299,
"narHash": "sha256-+1jyM4dsppYFgiJf+VkAAS/l5iF0y5J7D2l1fLzT8DA=",
"owner": "NixOS",
"lastModified": 1653476104,
"narHash": "sha256-oVuWUnGQX+fRn/cFoNfbLEUGtsyyXuMLDQFEZ2OxP3k=",
"owner": "hercules-ci",
"repo": "nixpkgs",
"rev": "5862243e1ab8c0a19cb448f523c27c167dcd826b",
"rev": "612e22e67eb6f8d5bfb6288abe515e9da3b96103",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "hercules-ci",
"ref": "module-docs-update",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -4,7 +4,10 @@
inputs = {
# Flakes don't give us a good way to depend on .., so we don't.
# This has drastic consequences of course.
nixpkgs.url = "github:NixOS/nixpkgs";
# https://github.com/NixOS/nixpkgs/pull/174460
# https://github.com/NixOS/nixpkgs/pull/174470
nixpkgs.url = "github:hercules-ci/nixpkgs/module-docs-update";
pre-commit-hooks-nix.url = "github:hercules-ci/pre-commit-hooks.nix/flakeModule";
pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";