more doc-work
This commit is contained in:
@@ -5,10 +5,16 @@
|
||||
services.docs-to-host.docs = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
subdir = mkOption {
|
||||
dirname = mkOption {
|
||||
type = types.str;
|
||||
example = "pdoc";
|
||||
description = lib.mdDoc "The path at which the documentation will be linked";
|
||||
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;
|
||||
@@ -29,8 +35,8 @@
|
||||
|
||||
config = let
|
||||
cfg = config.services.docs-to-host;
|
||||
mkRow = {subdir, path, desc}: ''<tr><td><a href="${subdir}/">${subdir}/</a><td>${desc}'';
|
||||
mkEntry = {subdir, path, desc}: { name = subdir; path = path; };
|
||||
mkRow = {dirname, basename, path, desc}: ''<tr><td><a href="${dirname}/${basename}">${dirname}</a><td>${desc}'';
|
||||
mkEntry = {dirname, basename, path, desc}: { name = dirname; path = path; };
|
||||
in {
|
||||
services.nginx.virtualHosts.${mkDomain "docs"} = {
|
||||
forceSSL = true; # addSSL = true;
|
||||
|
||||
Reference in New Issue
Block a user