From 635f5ea350f375d183ef6994691cf9c47f84191e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 16 Jun 2023 10:28:38 +0000 Subject: modules: use Markdown documentation descriptions --- modules/server/cgit/default.nix | 14 +++++++------- modules/server/ftp/default.nix | 2 +- modules/server/git-http-backend/default.nix | 14 +++++++------- modules/server/git/default.nix | 16 ++++++++-------- modules/workstation/windowing/sway/default.nix | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/server/cgit/default.nix b/modules/server/cgit/default.nix index a895fe94e80f..784504ad00ee 100644 --- a/modules/server/cgit/default.nix +++ b/modules/server/cgit/default.nix @@ -3,7 +3,7 @@ let inherit (builtins) split; inherit (lib) flip foldr groupBy head literalExpression mapAttrs - mapAttrs' mapAttrsToList mkOption nameValuePair optionalAttrs types; + mapAttrs' mapAttrsToList mdDoc mkOption nameValuePair optionalAttrs types; cfg = config.services.cgit-qyliss; @@ -42,14 +42,14 @@ in vhost = mkOption { type = types.str; example = "spectrum-os.org"; - description = "Nginx vhost for the cgit"; + description = mdDoc "Nginx vhost for the cgit"; }; path = mkOption { type = types.strMatching "/(.*[^/])?"; default = "/"; example = "/git"; - description = '' + description = mdDoc '' Path to be appended to all cgit URLs. Leading slashes are mandatory; trailing slashes are forbidden. @@ -60,19 +60,19 @@ in type = types.package; default = pkgs.cgit; defaultText = literalExpression "pkgs.cgit"; - description = "cgit package to use"; + description = mdDoc "cgit package to use"; }; cgiserver = mkOption { type = types.package; default = pkgs.cgiserver; defaultText = literalExpression "pkgs.cgiserver"; - description = "cgiserver package to use"; + description = mdDoc "cgiserver package to use"; }; config = mkOption { type = types.package; - description = '' + description = mdDoc '' Configuration file for cgit. See cgitrc 5. @@ -81,7 +81,7 @@ in }; }); default = {}; - description = "List of cgit instances to run"; + description = mdDoc "List of cgit instances to run"; }; }; diff --git a/modules/server/ftp/default.nix b/modules/server/ftp/default.nix index a0e32294aeb7..5b7a08144e67 100644 --- a/modules/server/ftp/default.nix +++ b/modules/server/ftp/default.nix @@ -12,7 +12,7 @@ in files = mkOption { default = {}; type = with types; attrsOf path; - description = '' + description = mdDoc '' Files to serve on https://ftp.qyliss.net/ ''; example = literalExample '' diff --git a/modules/server/git-http-backend/default.nix b/modules/server/git-http-backend/default.nix index 086e32f57db2..32e20e603e61 100644 --- a/modules/server/git-http-backend/default.nix +++ b/modules/server/git-http-backend/default.nix @@ -3,7 +3,7 @@ let inherit (builtins) split; inherit (lib) flip foldr groupBy head literalExpression mapAttrs mapAttrs' - mapAttrsToList mkOption nameValuePair optionalAttrs types; + mapAttrsToList mdDoc mkOption nameValuePair optionalAttrs types; cfg = config.services.git-http-backend; @@ -36,7 +36,7 @@ in package = mkOption { type = types.package; default = pkgs.gitMinimal; - description = "git package to use"; + description = mdDoc "git package to use"; }; instances = mkOption { @@ -45,14 +45,14 @@ in vhost = mkOption { type = types.str; example = "spectrum-os.org"; - description = "Nginx vhost for the git server"; + description = mdDoc "Nginx vhost for the git server"; }; path = mkOption { type = types.strMatching "/(.*[^/])?"; default = "/"; example = "/git"; - description = '' + description = mdDoc '' Path to be prepended to all clone URLs. Leading slashes are mandatory; trailing slashes are forbidden. @@ -63,13 +63,13 @@ in type = types.package; default = pkgs.cgiserver; defaultText = literalExpression "pkgs.cgiserver"; - description = "cgiserver package to use"; + description = mdDoc "cgiserver package to use"; }; projectRoot = mkOption { type = types.strMatching "/(.*[^/])?"; example = "/var/www/git"; - description = '' + description = mdDoc '' Directory in which to look for git repositories. Leading slashes are mandatory; trailing slashes are forbidden. @@ -78,7 +78,7 @@ in }; }); default = {}; - description = "List of git-http-backend instances to run"; + description = mdDoc "List of git-http-backend instances to run"; }; }; diff --git a/modules/server/git/default.nix b/modules/server/git/default.nix index bce947bfd430..523715a363d9 100644 --- a/modules/server/git/default.nix +++ b/modules/server/git/default.nix @@ -15,35 +15,35 @@ let options = { branch = mkOption { default = "main"; - description = "Branch to be the repository's HEAD"; + description = mdDoc "Branch to be the repository's HEAD"; type = types.str; }; description = mkOption { - description = "Description of the repository."; + description = mdDoc "Description of the repository."; type = types.str; }; config = mkOption { - description = "Git configuration for the repository."; + description = mdDoc "Git configuration for the repository."; type = types.attrs; default = {}; }; hooks = mkOption { - description = "Git hooks for the repository."; + description = mdDoc "Git hooks for the repository."; type = with types; attrsOf (listOf path); default = {}; }; owner = mkOption { - description = "Name of the user to own the git repository."; + description = mdDoc "Name of the user to own the git repository."; type = types.str; default = "-"; }; group = mkOption { - description = "Name of the group for the git repository."; + description = mdDoc "Name of the group for the git repository."; type = types.str; default = "-"; }; @@ -52,13 +52,13 @@ let in { options.declarative-git = { repositories = mkOption { - description = "Repositories to manage declaratively."; + description = mdDoc "Repositories to manage declaratively."; type = types.attrsOf (types.submodule repoOpts); default = {}; }; hooks = mkOption { - description = "Git hooks to apply to all declarative repositories."; + description = mdDoc "Git hooks to apply to all declarative repositories."; type = with types; attrsOf (listOf path); default = {}; }; diff --git a/modules/workstation/windowing/sway/default.nix b/modules/workstation/windowing/sway/default.nix index baaad51b8f3c..07b61c3e1c0f 100644 --- a/modules/workstation/windowing/sway/default.nix +++ b/modules/workstation/windowing/sway/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, config, ... }: let - inherit (lib) mkOption optionalString; + inherit (lib) mdDoc mkOption optionalString; inherit (lib.types) lines nullOr path; inherit (pkgs) callPackage substituteAll; @@ -14,13 +14,13 @@ in options = { programs.sway.extraConfig = mkOption { type = lines; - description = "Lines to append to sway's config file"; + description = mdDoc "Lines to append to sway's config file"; default = ""; }; programs.sway.wallpaper = mkOption { type = nullOr path; - description = "Path to wallpaper for sway and swaylock"; + description = mdDoc "Path to wallpaper for sway and swaylock"; default = null; }; }; -- cgit 1.4.1