config/profiles/web/docs/nixpkgs.nix

27 lines
780 B
Nix

{ 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 = "nix-manual";
path = "${pkgs.nix.doc}/share/doc/nix/manual";
desc = "Official nixpkgs manual";
}
{
dirname = "nixpkgs-manual";
basename= "manual.html";
path = "${nixpkgs-manual}/share/doc/nixpkgs";
desc = "Official nixpkgs manual";
}
{
dirname = "nixos-manual";
path = "${nixos-manual}/share/doc/nixos";
desc = "Official Nixos manual";
}
];
}