docs: refactor, move out of flake.nix
also filter source to limit rebuilds
This commit is contained in:
parent
7294a7afc9
commit
3fcadaf275
4 changed files with 31 additions and 18 deletions
dev
27
dev/docs.nix
Normal file
27
dev/docs.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
devShells.mkdocs = pkgs.mkShellNoCC {
|
||||
inputsFrom = [
|
||||
config.packages.docs
|
||||
];
|
||||
};
|
||||
packages = {
|
||||
docs = pkgs.runCommand "docs"
|
||||
{
|
||||
buildInputs = [
|
||||
pkgs.python3.pkgs.mkdocs-material
|
||||
];
|
||||
files = pkgs.lib.fileset.toSource {
|
||||
root = ../.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
../docs
|
||||
../mkdocs.yml
|
||||
];
|
||||
};
|
||||
}
|
||||
''
|
||||
cd $files
|
||||
mkdocs build --strict --site-dir $out
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue