mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2026-02-02 17:35:08 +01:00
style: Apply nixpkgs-fmt and fix
Apply standard formatting and some statix conventions using; ```sh nixpkgs-fmt **.nix && statix fix . ``` With the intent of making contribution a bit easier and reducing mental load in hand formatting (in the same vein as [black]). [black]: https://github.com/psf/black#the-uncompromising-code-formatter
This commit is contained in:
parent
b1a4ecb8ca
commit
08435eec4b
23 changed files with 171 additions and 158 deletions
13
doc.nix
13
doc.nix
|
|
@ -6,12 +6,12 @@ let
|
|||
rootMountPoint = "/mnt";
|
||||
};
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
modules = [
|
||||
{
|
||||
options.disko = {
|
||||
devices = lib.mkOption {
|
||||
type = types.devices;
|
||||
default = {};
|
||||
default = { };
|
||||
description = "The devices to set up";
|
||||
};
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ let
|
|||
];
|
||||
};
|
||||
options = nixosOptionsDoc {
|
||||
options = eval.options;
|
||||
inherit (eval) options;
|
||||
};
|
||||
md = (runCommand "disko-options.md" { } ''
|
||||
cat >$out <<EOF
|
||||
|
|
@ -28,14 +28,15 @@ let
|
|||
EOF
|
||||
cat ${options.optionsCommonMark} >>$out
|
||||
'').overrideAttrs (o: {
|
||||
# Work around https://github.com/hercules-ci/hercules-ci-agent/issues/168
|
||||
allowSubstitutes = true;
|
||||
# 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 ]; } ''
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue