From afec39f3d98d3486d38a6f58d28df15ba6754fa2 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 21 Jul 2023 15:30:03 +0200 Subject: [PATCH] make extraPluginType singular instead of a list --- lib/types/plugins.nix | 16 ++++++++-------- modules/core/default.nix | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index 6ee0d46..f4dde65 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -89,20 +89,20 @@ with lib; let "nvim-dap-ui" ]; # You can either use the name of the plugin or a package. - pluginsType = with types; - listOf ( - nullOr ( - either - (enum availablePlugins) - package - ) + pluginType = with types; + nullOr ( + either + package + (enum availablePlugins) ); + pluginsType = types.listOf pluginType; + extraPluginType = with types; submodule { options = { package = mkOption { - type = pluginsType; + type = pluginType; }; dependencies = mkOption { type = listOf str; diff --git a/modules/core/default.nix b/modules/core/default.nix index 5d87c9c..1515ca0 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -302,7 +302,7 @@ in { result; in { vim = { - startPlugins = concatMap (x: x.package) (attrValues cfg.extraPlugins); + startPlugins = map (x: x.package) (attrValues cfg.extraPlugins); configRC = { globalsScript = nvim.dag.entryAnywhere (concatStringsSep "\n" globalsScript);