{ config, pkgs, lib, mkDomain, ... }: { options = with lib; { #services.docs-to-host.enable = mkEnable "docs-to-host"; services.docs-to-host.docs = mkOption { type = types.listOf (types.submodule { options = { dirname = mkOption { type = types.str; example = "linux-doc"; description = lib.mdDoc "The relative dirname at which the documentation will be linked"; }; basename = mkOption { type = types.str; example = "foobar.html"; default = ""; description = lib.mdDoc "The basename at which the documentation will be linked"; }; path = mkOption { type = types.path; example = lib.literalExpression "pkgs.fetchzip {...}"; description = lib.mdDoc "The static html documentation to host"; }; desc = mkOption { type = types.str; #description = "A short decription about the hosted documentation in markdown."; description = "A short decription about the hosted documentation."; }; }; }); default = [ ]; #description = lib.mdDoc ''TODO''; }; }; # TODO: host man pages (man -H) config = let cfg = config.services.docs-to-host; mkRow = {dirname, basename, path, desc}: ''
URL | Desc ${lib.concatStringsSep "\n" ( builtins.map mkRow cfg.docs ) } |
---|