refactor mkdocs

- use devshell instead of package

- build pages with hercules-ci.github-pages

- drop unnecessary packages restriction
This commit is contained in:
zowoq 2023-08-28 14:21:56 +10:00 committed by Jonas Chevalier
parent 8b8a4ca8b3
commit 9c1545b0ab
3 changed files with 8 additions and 6 deletions

View file

@ -11,5 +11,10 @@
ssh-to-age ssh-to-age
]; ];
}; };
mkdocs = with pkgs; mkShellNoCC {
packages = [
python3.pkgs.mkdocs-material
];
};
}; };
} }

View file

@ -55,7 +55,6 @@
ciSystems = [ "x86_64-linux" "aarch64-linux" ]; ciSystems = [ "x86_64-linux" "aarch64-linux" ];
onPush.default.outputs = { onPush.default.outputs = {
checks = lib.mkForce self.outputs.checks.x86_64-linux; checks = lib.mkForce self.outputs.checks.x86_64-linux;
packages = lib.mkForce self.outputs.packages.x86_64-linux;
}; };
}; };
@ -87,15 +86,13 @@
nixosTests-pict-rs = pkgs.nixosTests.pict-rs; nixosTests-pict-rs = pkgs.nixosTests.pict-rs;
}; };
packages.pages = pkgs.runCommand "pages" hercules-ci.github-pages.settings.contents = pkgs.runCommand "pages"
{ {
buildInputs = [ pkgs.python3.pkgs.mkdocs-material ]; buildInputs = [ config.devShells.mkdocs.nativeBuildInputs ];
} '' } ''
cd ${self} cd ${self}
mkdocs build --strict --site-dir $out mkdocs build --strict --site-dir $out
''; '';
hercules-ci.github-pages.settings.contents = config.packages.pages;
}; };
flake.darwinConfigurations = flake.darwinConfigurations =

View file

@ -117,7 +117,7 @@ def mkdocs(c):
""" """
Serve docs (mkdoc serve) Serve docs (mkdoc serve)
""" """
c.run("nix develop .#pages -c mkdocs serve") c.run("nix develop .#mkdocs -c mkdocs serve")
def get_hosts(hosts: str) -> List[DeployHost]: def get_hosts(hosts: str) -> List[DeployHost]: