add podman container that serves docs on localhost:8080

This commit is contained in:
greyweather committed 2026-09-01 05:38:32 +01:00
1 parent 06666885be
commit 70ac7954ad
3 files changed
+25 -6

No files matched your search

+23 -4
View File
@@ -17,8 +17,9 @@
indexMd = let
rawText = ''
## Hello world
Welcome to the site!
## Welcome!
This site is rebuilt with every generation, and holds a complete record of all options declared within this flake.
Visit [NixOS](nixos-options.md) or [Home Manager](home-options.md) to see the available options.
'';
in pkgs.runCommand "index.md" {} ''
echo "${rawText}" >> $out
@@ -28,13 +29,16 @@
homeOptionsMd = mkOptionsDocFromModule "home-options.md" self.homeModules.options;
mkDocsConfig = ''
site_name: greyweather's nix flake options
site_name: flake options
nav:
- Home: 'index.md'
- Options:
- NixOS: 'nixos-options.md'
- Home Manager: 'home-options.md'
theme: material
theme:
name: material
palette:
scheme: slate
'';
mkDocsYml = pkgs.runCommand "mkdocs.yml" {} ''
@@ -76,4 +80,19 @@ in {
packages.docs = mkDocsDerivation { inherit pkgs; };
packages.docs-md = mkDocsDerivation { inherit pkgs; doBuild = false; };
};
flake.homeModules.graphics = { pkgs, ... }: {
services.podman = {
enable = true;
containers.flake-docs-nginx = {
image = "docker.io/library/nginx:latest";
volumes = [
"${mkDocsDerivation { inherit pkgs; }}:/usr/share/nginx/html"
];
ports = [
"8080:80"
];
};
};
};
}