config/profiles/web/docs/nixpkgs.nix

22 lines
637 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 = "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";
}
];
}