Unverified Commit ef44d467 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 2f73b699 790bb39e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
* [Official wiki](https://wiki.nixos.org/)
* [Community-maintained list of ways to get in touch](https://wiki.nixos.org/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)

# Other Project Repositories

+7 −0
Original line number Diff line number Diff line
@@ -1784,6 +1784,13 @@
      fingerprint = "C919 E69E A7C0 E147 9E0F  C26E 1EDA D0C6 70BD 062D";
    }];
  };
  assistant = {
    email = "assistant.moetron@gmail.com";
    github = "Assistant";
    githubId = 2748721;
    matrix = "@assistant:pygmalion.chat";
    name = "Assistant Moetron";
  };
  astavie = {
    email = "astavie@pm.me";
    github = "astavie";
+0 −83
Original line number Diff line number Diff line
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=. -i bash -p delta jq perl

set -euo pipefail
shopt -s inherit_errexit

cat <<'EOF'
This script attempts to automatically convert option descriptions from
DocBook syntax to markdown. Naturally this process is incomplete and
imperfect, so any changes generated by this script MUST be reviewed.

Possible problems include: incorrectly replaced tags, badly formatted
markdown, DocBook tags this script doesn't recognize remaining in the
output and crashing the docs build, incorrect escaping of markdown
metacharacters, incorrect unescaping of XML entities—and the list goes on.

Always review the generated changes!

Some known limitations:
  - Does not transform literalDocBook items
  - Replacements can occur in non-option code, such as string literals


EOF



build-options-json() {
    nix-build --no-out-link --expr '
        let
            sys = import ./nixos/default.nix {
                configuration = {};
            };
        in
        [
            sys.config.system.build.manual.optionsJSON
        ]
    '
}



git diff --quiet || {
    echo "Worktree is dirty. Please stash or commit first."
    exit 1
}

echo "Building options.json ..."
old_options=$(build-options-json)

echo "Applying replacements ..."
perl -pi -e '
    BEGIN {
        undef $/;
    }

    s,<literal>([^`]*?)</literal>,`$1`,smg;
    s,<replaceable>([^»]*?)</replaceable>,«$1»,smg;
    s,<filename>([^`]*?)</filename>,{file}`$1`,smg;
    s,<option>([^`]*?)</option>,{option}`$1`,smg;
    s,<code>([^`]*?)</code>,`$1`,smg;
    s,<command>([^`]*?)</command>,{command}`$1`,smg;
    s,<link xlink:href="(.+?)" ?/>,<$1>,smg;
    s,<link xlink:href="(.+?)">(.*?)</link>,[$2]($1),smg;
    s,<package>([^`]*?)</package>,`$1`,smg;
    s,<emphasis>([^*]*?)</emphasis>,*$1*,smg;
    s,<citerefentry>\s*
        <refentrytitle>\s*(.*?)\s*</refentrytitle>\s*
        <manvolnum>\s*(.*?)\s*</manvolnum>\s*
      </citerefentry>,{manpage}`$1($2)`,smgx;
    s,^( +description =),\1 lib.mdDoc,smg;
' "$@"

echo "Building options.json again ..."
new_options=$(build-options-json)


! cmp -s {$old_options,$new_options}/share/doc/nixos/options.json && {
    diff -U10 \
        <(jq . <$old_options/share/doc/nixos/options.json) \
        <(jq . <$new_options/share/doc/nixos/options.json) \
        | delta
}
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ However, it is possible and not-uncommon to create [impermanent systems], whose
`rootfs` is either a `tmpfs` or reset during boot. While NixOS itself supports
this kind of configuration, special care needs to be taken.

[impermanent systems]: https://nixos.wiki/wiki/Impermanence
[impermanent systems]: https://wiki.nixos.org/wiki/Impermanence


```{=include=} sections
+2 −0
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m

- [Scrutiny](https://github.com/AnalogJ/scrutiny), a S.M.A.R.T monitoring tool for hard disks with a web frontend.

- [davis](https://github.com/tchapi/davis), a simple CardDav and CalDav server inspired by Baïkal. Available as [services.davis]($opt-services-davis.enable).

- [systemd-lock-handler](https://git.sr.ht/~whynothugo/systemd-lock-handler/), a bridge between logind D-Bus events and systemd targets. Available as [services.systemd-lock-handler.enable](#opt-services.systemd-lock-handler.enable).

- [wastebin](https://github.com/matze/wastebin), a pastebin server written in rust. Available as [services.wastebin](#opt-services.wastebin.enable).
Loading