diff --git a/modules/misc/xdg-terminal-exec.nix b/modules/misc/xdg-terminal-exec.nix index 7de91a9e4..8c0a8512a 100644 --- a/modules/misc/xdg-terminal-exec.nix +++ b/modules/misc/xdg-terminal-exec.nix @@ -10,18 +10,16 @@ in { options = { xdg.terminal-exec = { - enable = lib.mkEnableOption "xdg-terminal-exec, the [proposed](https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46) Default Terminal Execution Specification"; + enable = lib.mkEnableOption '' + xdg-terminal-exec, the + [proposed](https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46) + Default Terminal Execution Specification''; + package = lib.mkPackageOption pkgs "xdg-terminal-exec" { nullable = true; }; + settings = lib.mkOption { type = with lib.types; attrsOf (listOf str); default = { }; - description = '' - Configuration options for the Default Terminal Execution Specification. - - The keys are the desktop environments that are matched (case-insensitively) against `$XDG_CURRENT_DESKTOP`, - or `default` which is used when the current desktop environment is not found in the configuration. - The values are a list of terminals' [desktop file IDs](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id) to try in order of decreasing priority. - ''; example = { default = [ "kitty.desktop" ]; GNOME = [ @@ -29,6 +27,13 @@ in "org.gnome.Terminal.desktop" ]; }; + description = '' + Configuration options for the Default Terminal Execution Specification. + + The keys are the desktop environments that are matched (case-insensitively) against {env}`XDG_CURRENT_DESKTOP`, + or `default` which is used when the current desktop environment is not found in the configuration. + The values are a list of terminals' [desktop file IDs](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id) to try in order of decreasing priority. + ''; }; }; }; @@ -38,7 +43,8 @@ in xdg.configFile = lib.mapAttrs' ( desktop: terminals: - # map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`, default to `.config/xdg-terminals.list` + # Map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`, + # default to `.config/xdg-terminals.list`. lib.nameValuePair ( "${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list" ) { text = lib.concatLines terminals; }