From e3ef5dae2b8398de454d17d9287bc7e6a0441eb8 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 8 Jan 2024 08:05:39 +0100 Subject: [PATCH] helpers/mkPlugin: add default value for description (use name) --- lib/helpers.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/helpers.nix b/lib/helpers.nix index b8a9db95..9369e3d5 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -313,7 +313,7 @@ with lib; rec { ... }: { name, - description, + description ? null, package ? null, extraPlugins ? [], extraPackages ? [], @@ -323,11 +323,6 @@ with lib; rec { }: let cfg = config.plugins.${name}; - description = - if description is null - then name - else description; - # TODO support nested options! pluginOptions = mapAttrs @@ -374,7 +369,11 @@ with lib; rec { in { options.plugins.${name} = { - enable = mkEnableOption description; + enable = mkEnableOption ( + if description == null + then name + else description + ); } // extraConfigOption // packageOption