config/profiles/http/docs/nixpkgs.nix

81 lines
2.6 KiB
Nix

{ config, pkgs, lib, inputs, system, ... }:
let
# https://stackoverflow.com/a/60232211
system = config.nixpkgs.system;
#mk-nixpkgs-manual = input: import "${input}/doc" { pkgs = import input { inherit system; }; };
mk-nixpkgs-manual = input: (import "${input}/pkgs/top-level/release.nix" { nixpkgs = import input { inherit system; }; }).manual;
mk-nixos-manual = input: (import "${input}/nixos/release.nix" { nixpkgs = import input { inherit system; }; }).manualHTML.${system};
in
{
services.docs-to-host.docs = [
{
dirname = "nix-manual";
path = "${pkgs.nix.doc}/share/doc/nix/manual";
desc = "Official Nix manual";
}
{
dirname = "nixpkgs-manual";
basename= "manual.html";
path = "${mk-nixpkgs-manual inputs.nixpkgs}/share/doc/nixpkgs";
desc = "Official Nixpkgs manual";
}
{
dirname = "nixos-manual";
path = "${mk-nixos-manual inputs.nixpkgs}/share/doc/nixos";
desc = "Official Nixos manual";
}
# == Old Nixpkgs manuals ==
/** /
{
dirname = "nixpkgs-manual-22.11";
basename= "manual.html";
path = "${mk-nixpkgs-manual inputs.nixpkgs-22}/share/doc/nixpkgs";
desc = "Official Nixpkgs 22.11 manual";
}
{
dirname = "nixpkgs-manual-21.11";
basename= "manual.html";
path = "${mk-nixpkgs-manual inputs.nixpkgs-21}/share/doc/nixpkgs";
desc = "Official Nixpkgs 21.11 manual";
}
{
dirname = "nixpkgs-manual-20.09";
basename= "manual.html";
path = "${mk-nixpkgs-manual inputs.nixpkgs-20}/share/doc/nixpkgs";
desc = "Official Nixpkgs 20.09 manual";
}
{
dirname = "nixpkgs-manual-19.09";
basename= "manual.html";
path = "${mk-nixpkgs-manual inputs.nixpkgs-19}/share/doc/nixpkgs";
desc = "Official Nixpkgs 19.09 manual";
}
/**/
# == Old Nixos manuals ==
/** /
{
dirname = "nixos-manual-22.11";
path = "${mk-nixos-manual inputs.nixpkgs-22}/share/doc/nixos";
desc = "Official Nixos 22.11 manual";
}
{
dirname = "nixos-manual-21.11";
path = "${mk-nixos-manual inputs.nixpkgs-21}/share/doc/nixos";
desc = "Official Nixos 21.11 manual";
}
{
dirname = "nixos-manual-20.09";
path = "${mk-nixos-manual inputs.nixpkgs-20}/share/doc/nixos";
desc = "Official Nixos 20.09 manual";
}
{
dirname = "nixos-manual-19.09";
path = "${mk-nixos-manual inputs.nixpkgs-19}/share/doc/nixos";
desc = "Official Nixos 19.09 manual";
}
/**/
];
}