dashboard: package option

This commit is contained in:
Alexander Nortung 2023-01-17 23:06:50 +01:00
parent cad521bc6a
commit 2298e766ce

View file

@ -10,6 +10,12 @@ in
plugins.dashboard = { plugins.dashboard = {
enable = mkEnableOption "Enable dashboard"; enable = mkEnableOption "Enable dashboard";
package = {
type = types.package;
default = pkgs.vimPlugins.dashboard-nvim;
description = "Plugin to use for dashboard-nvim";
};
header = mkOption { header = mkOption {
description = "Header text"; description = "Header text";
type = types.nullOr (types.listOf types.str); type = types.nullOr (types.listOf types.str);
@ -126,7 +132,7 @@ in
filteredOptions = filterAttrs (_: v: !isNull v) options; filteredOptions = filterAttrs (_: v: !isNull v) options;
in in
mkIf cfg.enable { mkIf cfg.enable {
extraPlugins = [ pkgs.vimPlugins.dashboard-nvim ]; extraPlugins = [ cfg.package ];
extraConfigLua = '' extraConfigLua = ''
local dashboard = require("dashboard") local dashboard = require("dashboard")