Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26.05
14 changes: 10 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
lib ? import "${sources.nixpkgs}/lib",
}:
let
version = "26.05";
revision = flake.sourceInfo.shortRev or flake.sourceInfo.dirtyShortRev;

devLib = import ./pkgs/lib.nix { inherit lib sources system; };

flakeAttrs = default.import ./maintainers/flake { };
Expand Down Expand Up @@ -60,10 +57,19 @@ let
};

manuals = self.call manuals/default.nix {
inherit revision version;
version = lib.strings.fileContents ./.version;
revision = flake.sourceInfo.shortRev or flake.sourceInfo.dirtyShortRev or "dev";
modulesPath = "${sources.nixpkgs}/nixos/modules";
};

# Combined overview and HTML manual
overview-with-manual = pkgs.runCommand "overview-with-manual" { } ''
mkdir -p $out
cp -r ${default.overview}/* $out/
mkdir -p $out/manual
cp -r ${default.manuals.html}/* $out/manual/
'';

nixos-modules =
# TODO: this is a weird shape for what we need: ngipkgs, services, modules?
{
Expand Down
21 changes: 9 additions & 12 deletions maintainers/flake/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,12 @@ in
};

# depends on the system (e.g. packages.x86_64-linux)
perSystem = rec {
packages = nonBrokenPackages // {
inherit (default) manuals overview;

# Combined overview and html manual
overview-with-manual = pkgs.runCommand "overview-with-manual" { } ''
mkdir -p $out
cp -r ${default.overview}/* $out/
mkdir -p $out/manual
cp -r ${default.manuals.html}/* $out/manual/
'';
perSystem = {
packages = {
inherit (default)
overview
overview-with-manual
;

# Configuration options in JSON
options =
Expand All @@ -57,7 +52,9 @@ in
mkdir $out
cp $build/share/doc/nixos/options.json $out/
'';
};
}
// nonBrokenPackages
// flattenFlakeAttrs { inherit (default) manuals; };

checks = default.import ./checks.nix { inherit nonBrokenPackages; };

Expand Down
17 changes: 17 additions & 0 deletions maintainers/shells/commands/dev/devmode-manual.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# live overview+manual watcher
{
lib,
devmode,
writeShellApplication,
}:
writeShellApplication {
name = "devmode-manual";
text = ''
${lib.getExe (
devmode.override {
buildArgs = "-A overview-with-manual --show-trace -v";
}
)}
'';
meta.description = "watches files for changes and live reloads the overview with the manual";
}
14 changes: 14 additions & 0 deletions manuals/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,17 @@ html[data-theme="dark"] details a {
html[data-theme="light"] details a {
color: #0042aa;
}

pre {
white-space:wrap;
}

h1 code .pre,
h2 code .pre,
h3 code .pre,
h4 code .pre,
h5 code .pre,
h6 code .pre {
/* Enable wrapping in titles containing code */
white-space:pre-wrap;
}
9 changes: 5 additions & 4 deletions manuals/_templates/about.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<div class="logo">
<a href="/">
<img src="/_static/_img/nix.svg" alt="">
<a href="/manual">
<span>NGIpkgs</span>
<div style="display:flex; flex-direction:row;">
<img src="/manuals/_static/_img/ngi.png" alt="NGI explicit logo">
<img src="/manuals/_static/_img/nix.svg" alt="Nix snowflake logo">
</div>
</a>
</div>

<iframe src="https://ghbtns.com/github-btn.html?user=ngi-nix&repo=ngipkgs&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>

<p>NGIpkgs Manuals</p>
5 changes: 0 additions & 5 deletions manuals/_templates/download-links.html

This file was deleted.

95 changes: 8 additions & 87 deletions manuals/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
# The short X.Y version.
release = ""

# Explanation: many options {option}`foo` are NixOS options,
# hence not available in NGIpkgs manuals.
suppress_warnings = [
# Explanation: many options {option}`foo` are NixOS options,
# hence not available in NGIpkgs manuals.
"ref.option",
]

Expand Down Expand Up @@ -141,6 +141,7 @@
"path_to_docs": "manuals",
"use_repository_button": True,
"show_navbar_depth": 2,
"max_navbar_depth": 100,
}


Expand All @@ -149,14 +150,15 @@

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
# html_title = 'nixpkgs-cookbook vrolling'
html_title = "NGIpkgs Manuals"

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
html_short_title = "NGIpkgs"


# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
html_logo = "_static/_img/nix.svg"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand Down Expand Up @@ -186,17 +188,8 @@
html_sidebars = {
"**": [
"about.html",
"search-field.html",
"search-button-field.html",
"sbt-sidebar-nav.html",
"download-links.html",
],
}

singlehtml_sidebars = {
"**": [
"about.html",
"sbt-sidebar-nav.html",
"download-links.html",
],
}

Expand Down Expand Up @@ -248,78 +241,6 @@
# Output file base name for HTML help builder.
# htmlhelp_basename = 'nixpkgs-'

# -- Options for LaTeX output ---------------------------------------------

# Documentation: https://www.sphinx-doc.org/en/master/latex.html
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
'preamble': r'''
\setcounter{tocdepth}{0}
''',
'sphinxsetup': r'TitleColor={RGB}{87, 154, 202}',
# Latex figure (float) alignment
#'figure_align': 'htbp',
'extrapackages': r'''
''',
}

# Grouping the document tree into LaTeX files.
# Documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_documents
latex_documents = [
(
"Contributor",
"NGIpkgs_Contributor_Manual.tex",
"NGIpkgs Contributor Manual",
"NGIpkgs Contributor",
"manual",
False,
),
(
"Options",
"NGIpkgs_Options.tex",
"NGIpkgs Options",
"NGIpkgs Contributors",
"howto",
False,
),
(
"User",
"NGIpkgs_User_Manual.tex",
"NGIpkgs User Manual",
"NGIpkgs Contributors",
"manual",
False,
),
]

latex_engine = "lualatex"
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = "_static/_img/nix.pdf"

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False

latex_use_xindy = False

# If true, show page references after internal links.
latex_show_pagerefs = True

# If true, show URL addresses after external links.
latex_show_urls = 'footnote'

# Documents to append as an appendix to all manuals.
# latex_appendices = []

# If false, no module index is generated.
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
Expand Down
Loading