more doc-work
This commit is contained in:
parent
b1d987763c
commit
91dc6fa2a5
@ -7,6 +7,7 @@
|
||||
* https://nixos.wiki/wiki/Flakes
|
||||
* https://teu5us.github.io/nix-lib.html
|
||||
* https://ryantm.github.io/nixpkgs/builders/trivial-builders/
|
||||
* https://nixos.wiki/wiki/Nix-writers
|
||||
|
||||
# TODOs:
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
|
||||
inputs.unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||
inputs.nur.url = "github:nix-community/NUR";
|
||||
inputs.home-manager.url = "github:nix-community/home-manager";
|
||||
inputs.home-manager.url = "github:nix-community/home-manager"; #/release-22.11";
|
||||
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
|
@ -48,9 +48,11 @@
|
||||
#../../profiles/web/services/openspeedtest
|
||||
|
||||
../../profiles/web/docs
|
||||
../../profiles/web/docs/pdoc
|
||||
../../profiles/web/docs/python-docs
|
||||
../../profiles/web/docs/yagcd
|
||||
../../profiles/web/docs/pdoc.nix
|
||||
../../profiles/web/docs/python-docs.nix
|
||||
../../profiles/web/docs/nixpkgs.nix
|
||||
../../profiles/web/docs/linux-docs.nix
|
||||
../../profiles/web/docs/yagcd.nix
|
||||
|
||||
../../profiles/web/sites/linktree-pbsds
|
||||
../../profiles/web/sites/refleksjon-no
|
||||
|
@ -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";
|
||||
}];
|
||||
|
||||
/** /
|
@ -227,7 +227,8 @@
|
||||
programs.exa.enable = true;
|
||||
programs.exa.enableAliases = true;
|
||||
programs.direnv.enable = true;
|
||||
#programs.mpv.bindings
|
||||
programs.mpv.bindings."SHIFT+n" = "sub-seek -1";
|
||||
programs.mpv.bindings."n" = "sub-seek 1";
|
||||
#programs.mpv.config
|
||||
|
||||
# TODO: implement programs.bat.enableAliases
|
||||
|
Loading…
Reference in New Issue
Block a user