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 { home.file = mkOption {
description = "Attribute set of files to link into the user home."; description = "Attribute set of files to link into the user home.";
default = {}; default = {};
type = fileType "home.file" "<envar>HOME</envar>" homeDirectory; type = fileType "home.file" "{env}`HOME`" homeDirectory;
}; };
home-files = mkOption { home-files = mkOption {

View file

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

View file

@ -34,8 +34,7 @@ in {
}; };
configFile = mkOption { configFile = mkOption {
type = fileType "xdg.configFile" "<varname>xdg.configHome</varname>" type = fileType "xdg.configFile" "{var}`xdg.configHome`" cfg.configHome;
cfg.configHome;
default = { }; default = { };
description = '' description = ''
Attribute set of files to link into the user's XDG 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 # passing actual "${xdg.configHome}/nvim" as basePath was a bit tricky
# due to how fileType.target is implemented # due to how fileType.target is implemented
type = fileType "programs.neovim.plugins._.runtime" type = fileType "programs.neovim.plugins._.runtime"
"<varname>xdg.configHome/nvim</varname>" "nvim"; "{var}`xdg.configHome/nvim`" "nvim";
example = literalExpression '' example = literalExpression ''
{ "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; } { "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
''; '';

View file

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