mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
As discussed in [this comment](https://github.com/nix-community/disko/pull/143#discussion_r1097912402), as a blanket rule converting everything possible to `inherit` like statements can hurt readability. Add config file for statix to disable these checks and fixes, then rerun the autofix with these options.
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ lib, nixosOptionsDoc, runCommand, fetchurl, pandoc }:
|
|
|
|
let
|
|
types = import ./types {
|
|
inherit lib;
|
|
rootMountPoint = "/mnt";
|
|
};
|
|
eval = lib.evalModules {
|
|
modules = [
|
|
{
|
|
options.disko = {
|
|
devices = lib.mkOption {
|
|
type = types.devices;
|
|
default = { };
|
|
description = "The devices to set up";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
options = nixosOptionsDoc {
|
|
options = eval.options;
|
|
};
|
|
md = (runCommand "disko-options.md" { } ''
|
|
cat >$out <<EOF
|
|
# Disko options
|
|
|
|
EOF
|
|
cat ${options.optionsCommonMark} >>$out
|
|
'').overrideAttrs (o: {
|
|
# Work around https://github.com/hercules-ci/hercules-ci-agent/issues/168
|
|
allowSubstitutes = true;
|
|
});
|
|
css = fetchurl {
|
|
url = "https://gist.githubusercontent.com/killercup/5917178/raw/40840de5352083adb2693dc742e9f75dbb18650f/pandoc.css";
|
|
sha256 = "sha256-SzSvxBIrylxBF6B/mOImLlZ+GvCfpWNLzGFViLyOeTk=";
|
|
};
|
|
in
|
|
runCommand "disko.html" { nativeBuildInputs = [ pandoc ]; } ''
|
|
mkdir $out
|
|
cp ${css} $out/pandoc.css
|
|
pandoc --css="pandoc.css" ${md} --to=html5 -s -f markdown+smart --metadata pagetitle="Disko options" -o $out/index.html
|
|
''
|