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;
|
||||
|
||||
8
profiles/web/docs/linux-docs.nix
Normal file
8
profiles/web/docs/linux-docs.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.docs-to-host.docs = [{
|
||||
desc = "Linux kernel html documentation";
|
||||
dirname = "linux-docs";
|
||||
path = "${pkgs.linux-doc}/share/doc/linux-doc";
|
||||
}];
|
||||
}
|
||||
21
profiles/web/docs/nixpkgs.nix
Normal file
21
profiles/web/docs/nixpkgs.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
let
|
||||
# https://stackoverflow.com/a/60232211
|
||||
nixpkgs-manual = import "${inputs.nixpkgs}/doc" { inherit pkgs; };
|
||||
nixos-manual = (import "${inputs.nixpkgs}/nixos/release.nix" { inherit (inputs) nixpkgs; }).manualHTML.${config.nixpkgs.system};
|
||||
in
|
||||
{
|
||||
services.docs-to-host.docs = [
|
||||
{
|
||||
dirname = "nixpkgs-manual";
|
||||
basename= "manual.html";
|
||||
path = "${nixpkgs-manual}/share/doc/nixpkgs";
|
||||
desc = "Officia nixpkgs manual";
|
||||
}
|
||||
{
|
||||
dirname = "nixos-manual";
|
||||
path = "${nixos-manual}/share/doc/nixos";
|
||||
desc = "Officia Nixos manual";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, mkDomain, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
# pdoc data
|
||||
@@ -257,14 +257,14 @@ in {
|
||||
|
||||
services.docs-to-host.docs = [
|
||||
{
|
||||
subdir = "pdoc-docs";
|
||||
path = mkPdocs false;
|
||||
desc = "Documentation for various python modules, generated with pdoc";
|
||||
dirname = "pdoc-docs";
|
||||
path = mkPdocs false;
|
||||
desc = "Documentation for various python modules, generated with pdoc";
|
||||
}
|
||||
{
|
||||
subdir = "pdoc3-docs";
|
||||
path = mkPdocs true;
|
||||
desc = "Documentation for various python modules, generated with pdoc";
|
||||
dirname = "pdoc3-docs";
|
||||
path = mkPdocs true;
|
||||
desc = "Documentation for various python modules, generated with pdoc3";
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
let
|
||||
python-versions = lib.attrNames (lib.filterAttrs (k: v: lib.isDerivation v) pkgs.pythonDocs.html);
|
||||
mkDocsEntry = python-version: {
|
||||
subdir = "${python-version}";
|
||||
path = "${builtins.toString pkgs.pythonDocs.html.${python-version}}/share/doc/${python-version}/html";
|
||||
desc = "Documentation for Python ${pkgs.${python-version}.version}";
|
||||
dirname = "${python-version}";
|
||||
path = "${builtins.toString pkgs.pythonDocs.html.${python-version}}/share/doc/${python-version}/html";
|
||||
desc = "Documentation for Python ${pkgs.${python-version}.version}";
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, mkDomain, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
yagcd = pkgs.fetchzip {
|
||||
url = "http://hitmen.c02.at/files/yagcd/yagcd.tar.gz";
|
||||
@@ -8,9 +8,9 @@ let
|
||||
in
|
||||
{
|
||||
services.docs-to-host.docs = [{
|
||||
desc = "Yet another Gamecube Documentation";
|
||||
subdir = "yagcd";
|
||||
path = "${yagcd}/yagcd";
|
||||
desc = "Yet another Gamecube Documentation";
|
||||
dirname = "yagcd";
|
||||
path = "${yagcd}/yagcd";
|
||||
}];
|
||||
|
||||
/** /
|
||||
Reference in New Issue
Block a user