treewide: convert parameterized docs to Markdown

Parameterized documentation generators like this can't be converted
automatically.
This commit is contained in:
Emily 2023-06-30 06:22:38 +01:00
parent 3228f92b90
commit 3222c99a91
5 changed files with 14 additions and 18 deletions

View file

@ -28,7 +28,7 @@ in
home.file = mkOption {
description = "Attribute set of files to link into the user home.";
default = {};
type = fileType "home.file" "<envar>HOME</envar>" homeDirectory;
type = fileType "home.file" "{env}`HOME`" homeDirectory;
};
home-files = mkOption {

View file

@ -32,7 +32,7 @@ in
in
removePrefix (homeDirectory + "/") absPath;
defaultText = literalExpression "name";
description = ''
description = lib.mdDoc ''
Path to target file relative to ${basePathDesc}.
'';
};

View file

@ -34,8 +34,7 @@ in {
};
configFile = mkOption {
type = fileType "xdg.configFile" "<varname>xdg.configHome</varname>"
cfg.configHome;
type = fileType "xdg.configFile" "{var}`xdg.configHome`" cfg.configHome;
default = { };
description = ''
Attribute set of files to link into the user's XDG

View file

@ -44,7 +44,7 @@ let
# passing actual "${xdg.configHome}/nvim" as basePath was a bit tricky
# due to how fileType.target is implemented
type = fileType "programs.neovim.plugins._.runtime"
"<varname>xdg.configHome/nvim</varname>" "nvim";
"{var}`xdg.configHome/nvim`" "nvim";
example = literalExpression ''
{ "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
'';

View file

@ -59,13 +59,10 @@ let
unitDescription = type: ''
Definition of systemd per-user ${type} units. Attributes are
merged recursively.
</para><para>
Note that the attributes follow the capitalization and naming used
by systemd. More details can be found in
<citerefentry>
<refentrytitle>systemd.${type}</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>.
{manpage}`systemd.${type}(5)`.
'';
unitExample = type:
@ -109,56 +106,56 @@ in {
services = mkOption {
default = { };
type = unitType "service";
description = unitDescription "service";
description = lib.mdDoc (unitDescription "service");
example = unitExample "Service";
};
slices = mkOption {
default = { };
type = unitType "slice";
description = unitDescription "slice";
description = lib.mdDoc (unitDescription "slice");
example = unitExample "Slice";
};
sockets = mkOption {
default = { };
type = unitType "socket";
description = unitDescription "socket";
description = lib.mdDoc (unitDescription "socket");
example = unitExample "Socket";
};
targets = mkOption {
default = { };
type = unitType "target";
description = unitDescription "target";
description = lib.mdDoc (unitDescription "target");
example = unitExample "Target";
};
timers = mkOption {
default = { };
type = unitType "timer";
description = unitDescription "timer";
description = lib.mdDoc (unitDescription "timer");
example = unitExample "Timer";
};
paths = mkOption {
default = { };
type = unitType "path";
description = unitDescription "path";
description = lib.mdDoc (unitDescription "path");
example = unitExample "Path";
};
mounts = mkOption {
default = { };
type = unitType "mount";
description = unitDescription "mount";
description = lib.mdDoc (unitDescription "mount");
example = unitExample "Mount";
};
automounts = mkOption {
default = { };
type = unitType "automount";
description = unitDescription "automount";
description = lib.mdDoc (unitDescription "automount");
example = unitExample "Automount";
};