diff options
author | pennae <github@quasiparticle.net> | 2022-07-28 23:19:15 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2022-07-30 15:16:34 +0200 |
commit | 2e751c0772b9d48ff6923569adfa661b030ab6a2 (patch) | |
tree | 0accd740380b7b7fe3ea5965a3a4517674e79260 /nixos/modules/services/x11/window-managers | |
parent | 52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff) | |
download | nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.gz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.bz2 nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.lz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.xz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.zst nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.zip |
treewide: automatically md-convert option descriptions
the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
Diffstat (limited to 'nixos/modules/services/x11/window-managers')
9 files changed, 30 insertions, 30 deletions
diff --git a/nixos/modules/services/x11/window-managers/awesome.nix b/nixos/modules/services/x11/window-managers/awesome.nix index c6c0c934f9a..8db7d86c72c 100644 --- a/nixos/modules/services/x11/window-managers/awesome.nix +++ b/nixos/modules/services/x11/window-managers/awesome.nix @@ -26,21 +26,21 @@ in luaModules = mkOption { default = []; type = types.listOf types.package; - description = "List of lua packages available for being used in the Awesome configuration."; + description = lib.mdDoc "List of lua packages available for being used in the Awesome configuration."; example = literalExpression "[ pkgs.luaPackages.vicious ]"; }; package = mkOption { default = null; type = types.nullOr types.package; - description = "Package to use for running the Awesome WM."; + description = lib.mdDoc "Package to use for running the Awesome WM."; apply = pkg: if pkg == null then pkgs.awesome else pkg; }; noArgb = mkOption { default = false; type = types.bool; - description = "Disable client transparency support, which can be greatly detrimental to performance in some setups"; + description = lib.mdDoc "Disable client transparency support, which can be greatly detrimental to performance in some setups"; }; }; diff --git a/nixos/modules/services/x11/window-managers/bspwm.nix b/nixos/modules/services/x11/window-managers/bspwm.nix index ade24061a06..4fcd2b7c720 100644 --- a/nixos/modules/services/x11/window-managers/bspwm.nix +++ b/nixos/modules/services/x11/window-managers/bspwm.nix @@ -16,7 +16,7 @@ in default = pkgs.bspwm; defaultText = literalExpression "pkgs.bspwm"; example = literalExpression "pkgs.bspwm-unstable"; - description = '' + description = lib.mdDoc '' bspwm package to use. ''; }; @@ -24,7 +24,7 @@ in type = with types; nullOr path; example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"''; default = null; - description = '' + description = lib.mdDoc '' Path to the bspwm configuration file. If null, $HOME/.config/bspwm/bspwmrc will be used. ''; @@ -36,7 +36,7 @@ in default = pkgs.sxhkd; defaultText = literalExpression "pkgs.sxhkd"; example = literalExpression "pkgs.sxhkd-unstable"; - description = '' + description = lib.mdDoc '' sxhkd package to use. ''; }; @@ -44,7 +44,7 @@ in type = with types; nullOr path; example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"''; default = null; - description = '' + description = lib.mdDoc '' Path to the sxhkd configuration file. If null, $HOME/.config/sxhkd/sxhkdrc will be used. ''; diff --git a/nixos/modules/services/x11/window-managers/clfswm.nix b/nixos/modules/services/x11/window-managers/clfswm.nix index 78772c79974..cf8eec249c6 100644 --- a/nixos/modules/services/x11/window-managers/clfswm.nix +++ b/nixos/modules/services/x11/window-managers/clfswm.nix @@ -14,7 +14,7 @@ in type = types.package; default = pkgs.lispPackages.clfswm; defaultText = literalExpression "pkgs.lispPackages.clfswm"; - description = '' + description = lib.mdDoc '' clfswm package to use. ''; }; diff --git a/nixos/modules/services/x11/window-managers/exwm.nix b/nixos/modules/services/x11/window-managers/exwm.nix index b505f720f04..5b0a15804ef 100644 --- a/nixos/modules/services/x11/window-managers/exwm.nix +++ b/nixos/modules/services/x11/window-managers/exwm.nix @@ -26,7 +26,7 @@ in (require 'exwm) (exwm-enable) ''; - description = '' + description = lib.mdDoc '' Emacs lisp code to be run after loading the user's init file. If enableDefaultConfig is true, this will be run before loading the default config. @@ -35,7 +35,7 @@ in enableDefaultConfig = mkOption { default = true; type = lib.types.bool; - description = "Enable an uncustomised exwm configuration."; + description = lib.mdDoc "Enable an uncustomised exwm configuration."; }; extraPackages = mkOption { type = types.functionTo (types.listOf types.package); diff --git a/nixos/modules/services/x11/window-managers/herbstluftwm.nix b/nixos/modules/services/x11/window-managers/herbstluftwm.nix index 354d70c695c..af077c4d228 100644 --- a/nixos/modules/services/x11/window-managers/herbstluftwm.nix +++ b/nixos/modules/services/x11/window-managers/herbstluftwm.nix @@ -15,7 +15,7 @@ in type = types.package; default = pkgs.herbstluftwm; defaultText = literalExpression "pkgs.herbstluftwm"; - description = '' + description = lib.mdDoc '' Herbstluftwm package to use. ''; }; @@ -23,7 +23,7 @@ in configFile = mkOption { default = null; type = with types; nullOr path; - description = '' + description = lib.mdDoc '' Path to the herbstluftwm configuration file. If left at the default value, $XDG_CONFIG_HOME/herbstluftwm/autostart will be used. diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix index 99f9997024f..87479f2ac45 100644 --- a/nixos/modules/services/x11/window-managers/i3.nix +++ b/nixos/modules/services/x11/window-managers/i3.nix @@ -13,7 +13,7 @@ in configFile = mkOption { default = null; type = with types; nullOr path; - description = '' + description = lib.mdDoc '' Path to the i3 configuration file. If left at the default value, $HOME/.i3/config will be used. ''; @@ -22,7 +22,7 @@ in extraSessionCommands = mkOption { default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Shell commands executed just before i3 is started. ''; }; @@ -32,7 +32,7 @@ in default = pkgs.i3; defaultText = literalExpression "pkgs.i3"; example = literalExpression "pkgs.i3-gaps"; - description = '' + description = lib.mdDoc '' i3 package to use. ''; }; @@ -47,7 +47,7 @@ in i3lock ] ''; - description = '' + description = lib.mdDoc '' Extra packages to be installed system wide. ''; }; diff --git a/nixos/modules/services/x11/window-managers/mlvwm.nix b/nixos/modules/services/x11/window-managers/mlvwm.nix index 08dd0402029..0ee1d7b097e 100644 --- a/nixos/modules/services/x11/window-managers/mlvwm.nix +++ b/nixos/modules/services/x11/window-managers/mlvwm.nix @@ -13,7 +13,7 @@ in configFile = mkOption { default = null; type = with types; nullOr path; - description = '' + description = lib.mdDoc '' Path to the mlvwm configuration file. If left at the default value, $HOME/.mlvwmrc will be used. ''; diff --git a/nixos/modules/services/x11/window-managers/wmderland.nix b/nixos/modules/services/x11/window-managers/wmderland.nix index 56b69220965..835c1b30281 100644 --- a/nixos/modules/services/x11/window-managers/wmderland.nix +++ b/nixos/modules/services/x11/window-managers/wmderland.nix @@ -13,7 +13,7 @@ in extraSessionCommands = mkOption { default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Shell commands executed just before wmderland is started. ''; }; @@ -38,7 +38,7 @@ in rxvt-unicode ] ''; - description = '' + description = lib.mdDoc '' Extra packages to be installed system wide. ''; }; diff --git a/nixos/modules/services/x11/window-managers/xmonad.nix b/nixos/modules/services/x11/window-managers/xmonad.nix index 66d11131391..476621bad77 100644 --- a/nixos/modules/services/x11/window-managers/xmonad.nix +++ b/nixos/modules/services/x11/window-managers/xmonad.nix @@ -76,13 +76,13 @@ in { enableContribAndExtras = mkOption { default = false; type = lib.types.bool; - description = "Enable xmonad-{contrib,extras} in Xmonad."; + description = lib.mdDoc "Enable xmonad-{contrib,extras} in Xmonad."; }; config = mkOption { default = null; type = with lib.types; nullOr (either path str); - description = '' + description = lib.mdDoc '' Configuration from which XMonad gets compiled. If no value is specified, a vanilla xmonad binary is put in PATH, which will attempt to recompile and exec your xmonad config from $HOME/.xmonad. @@ -94,17 +94,17 @@ in { "mod+q" restart key binding dysfunctional though, because that attempts to call your binary with the "--restart" command line option, unless you implement that yourself. You way mant to bind "mod+q" to - <literal>(restart "xmonad" True)</literal> instead, which will just restart + `(restart "xmonad" True)` instead, which will just restart xmonad from PATH. This allows e.g. switching to the new xmonad binary after rebuilding your system with nixos-rebuild. For the same reason, ghc is not added to the environment when this - option is set, unless <option>enableConfiguredRecompile</option> is - set to <literal>true</literal>. + option is set, unless {option}`enableConfiguredRecompile` is + set to `true`. If you actually want to run xmonad with a config specified here, but also be able to recompile and restart it from a copy of that source in - $HOME/.xmonad on the fly, set <option>enableConfiguredRecompile</option> - to <literal>true</literal> and implement something like "compileRestart" + $HOME/.xmonad on the fly, set {option}`enableConfiguredRecompile` + to `true` and implement something like "compileRestart" from the example. This should allow you to switch at will between the local xmonad and the one NixOS puts in your PATH. @@ -162,8 +162,8 @@ in { enableConfiguredRecompile = mkOption { default = false; type = lib.types.bool; - description = '' - Enable recompilation even if <option>config</option> is set to a + description = lib.mdDoc '' + Enable recompilation even if {option}`config` is set to a non-null value. This adds the necessary Haskell dependencies (GHC with packages) to the xmonad binary's environment. ''; @@ -172,7 +172,7 @@ in { xmonadCliArgs = mkOption { default = []; type = with lib.types; listOf str; - description = '' + description = lib.mdDoc '' Command line arguments passed to the xmonad binary. ''; }; @@ -180,7 +180,7 @@ in { ghcArgs = mkOption { default = []; type = with lib.types; listOf str; - description = '' + description = lib.mdDoc '' Command line arguments passed to the compiler (ghc) invocation when xmonad.config is set. ''; |