From 84d8b9a809ff4ece36c31dcec57966f3b34d20b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 22 Dec 2022 15:17:05 +0100 Subject: [PATCH 1/2] nixos/systemd: document what `scriptArgs` is for --- nixos/lib/systemd-unit-options.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/lib/systemd-unit-options.nix b/nixos/lib/systemd-unit-options.nix index 44f26572a23b..9c7cb34f14b5 100644 --- a/nixos/lib/systemd-unit-options.nix +++ b/nixos/lib/systemd-unit-options.nix @@ -324,7 +324,11 @@ in rec { scriptArgs = mkOption { type = types.str; default = ""; - description = lib.mdDoc "Arguments passed to the main process script."; + example = "%i"; + description = lib.mdDoc '' + Arguments passed to the main process script. + Can contain specifiers (`%` placeholders expanded by systemd, see {manpage}`systemd.unit(5)`). + ''; }; preStart = mkOption { From feb9ba583931314ba4451bb0fa04a5cbe43aaaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 22 Dec 2022 15:48:43 +0100 Subject: [PATCH 2/2] doc/link-unix-man-references: add a bunch of systemd pages --- .../link-unix-man-references.lua | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/build-aux/pandoc-filters/link-unix-man-references.lua b/doc/build-aux/pandoc-filters/link-unix-man-references.lua index e437ac73a1cb..b81d4a0979e7 100644 --- a/doc/build-aux/pandoc-filters/link-unix-man-references.lua +++ b/doc/build-aux/pandoc-filters/link-unix-man-references.lua @@ -3,10 +3,31 @@ Turns a manpage reference into a link, when a mapping is defined below. ]] local man_urls = { - ["tmpfiles.d(5)"] = "https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html", ["nix.conf(5)"] = "https://nixos.org/manual/nix/stable/#sec-conf-file", - ["systemd.time(7)"] = "https://www.freedesktop.org/software/systemd/man/systemd.time.html", + + ["journald.conf(5)"] = "https://www.freedesktop.org/software/systemd/man/journald.conf.html", + ["logind.conf(5)"] = "https://www.freedesktop.org/software/systemd/man/logind.conf.html", + ["networkd.conf(5)"] = "https://www.freedesktop.org/software/systemd/man/networkd.conf.html", + ["systemd.automount(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.automount.html", + ["systemd.exec(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.exec.html", + ["systemd.link(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.link.html", + ["systemd.mount(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.mount.html", + ["systemd.netdev(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.netdev.html", + ["systemd.network(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.network.html", + ["systemd.nspawn(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.nspawn.html", + ["systemd.path(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.path.html", + ["systemd.resource-control(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html", + ["systemd.scope(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.scope.html", + ["systemd.service(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.service.html", + ["systemd.slice(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.slice.html", + ["systemd.socket(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.socket.html", ["systemd.timer(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.timer.html", + ["systemd.unit(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.unit.html", + ["timesyncd.conf(5)"] = "https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html", + ["tmpfiles.d(5)"] = "https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html", + ["systemd.time(7)"] = "https://www.freedesktop.org/software/systemd/man/systemd.time.html", + ["systemd-fstab-generator(8)"] = "https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html", + ["systemd-networkd-wait-online.service(8)"] = "https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.service.html", } function Code(elem)