diff --git a/subprojects/wrapper-manager-fds/docs/.gitignore b/subprojects/wrapper-manager-fds/docs/.gitignore index b8488598..775b0932 100644 --- a/subprojects/wrapper-manager-fds/docs/.gitignore +++ b/subprojects/wrapper-manager-fds/docs/.gitignore @@ -1,3 +1,5 @@ +# All of the generated assets. +/content/*/nix-module-options/*/content.json ### Hugo ### # Generated files by hugo diff --git a/subprojects/wrapper-manager-fds/docs/default.nix b/subprojects/wrapper-manager-fds/docs/default.nix index 6e0572ba..6e5f512e 100644 --- a/subprojects/wrapper-manager-fds/docs/default.nix +++ b/subprojects/wrapper-manager-fds/docs/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { patchPhase = '' runHook prePatch - cp "${optionsDoc.optionsJSON}" > "${finalAttrs.src}/content/" + install -Dm0644 "${optionsDoc.optionsJSON}/share/doc/nixos/options.json" "${finalAttrs.src}/content/en-US/nix-module-options/module-environment/content.json" runHook postPatch ''; diff --git a/subprojects/wrapper-manager-fds/docs/shell.nix b/subprojects/wrapper-manager-fds/docs/shell.nix index 7261ae3f..623927c0 100644 --- a/subprojects/wrapper-manager-fds/docs/shell.nix +++ b/subprojects/wrapper-manager-fds/docs/shell.nix @@ -4,7 +4,12 @@ in { pkgs ? import sources.nixos-unstable { } }: let + inherit (pkgs) nixosOptionsDoc; websitePkg = import ./. { inherit pkgs; }; + wrapperManagerLib = import ../lib/env.nix; + + wrapperManagerEval = wrapperManagerLib.eval { inherit pkgs; }; + optionsDoc = nixosOptionsDoc { inherit (wrapperManagerEval) options; }; in with pkgs; mkShell { inputsFrom = [ websitePkg ]; @@ -13,4 +18,8 @@ with pkgs; mkShell { nodePackages.prettier vscode-langservers-extracted ]; + + shellHook = '' + install -Dm0644 ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./content/en-US/nix-module-options/module-environment/content.json + ''; }