mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 16:45:28 +03:00
16 lines
414 B
Nix
16 lines
414 B
Nix
{
|
|
perSystem = { pkgs, lib, ... }: {
|
|
packages.docs = pkgs.runCommand "nixos-remote-docs"
|
|
{
|
|
passthru.serve = pkgs.writeShellScriptBin "serve" ''
|
|
cd docs
|
|
${lib.getExe pkgs.mdbook} serve --dest-dir $(${pkgs.coreutils}/bin/mktemp -d)
|
|
'';
|
|
}
|
|
''
|
|
cp -r ${lib.cleanSource ./.}/* .
|
|
${lib.getExe pkgs.mdbook} build --dest-dir "$out"
|
|
'';
|
|
};
|
|
}
|