From abfa06a0c329446342b29bac8f60d132931c9cde Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 18 Sep 2024 09:51:15 +0800 Subject: [PATCH] nixos/services/crowdsec: update `plugins` to `notificationPlugins` Just to be more specific for the FUTURE! --- modules/nixos/services/crowdsec.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/nixos/services/crowdsec.nix b/modules/nixos/services/crowdsec.nix index 34c61928..bcb22bde 100644 --- a/modules/nixos/services/crowdsec.nix +++ b/modules/nixos/services/crowdsec.nix @@ -29,7 +29,7 @@ let default = pluginsDir; defaultText = '' All of the compiled plugins from - {options}`services.crowdsec.plugins..package`. + {options}`services.crowdsec.notificationPlugins..package`. ''; }; }; @@ -51,10 +51,10 @@ let }; pluginsDir = pkgs.symlinkJoin { - name = "crowdsec-system-plugins"; + name = "crowdsec-system-notification-plugins"; paths = let - plugins = lib.filterAttrs (n: v: v.package != null) cfg.plugins; + plugins = lib.filterAttrs (n: v: v.package != null) cfg.notificationPlugins; in lib.mapAttrsToList (n: v: "${v.package}/share/crowdsec") plugins; }; @@ -63,9 +63,9 @@ let pluginsConfigs = lib.mapAttrsToList (n: v: settingsFormat.generate "crowdsec-system-plugin-config-${n}" v.settings) - cfg.plugins; + cfg.notificationPlugins; in pkgs.symlinkJoin { - name = "crowdsec-system-plugins-configs"; + name = "crowdsec-system-notification-plugins-configs"; paths = pluginsConfigs; }; @@ -159,10 +159,11 @@ in ''; }; - plugins = lib.mkOption { + notificationPlugins = lib.mkOption { type = with lib.types; attrsOf (submodule crowdsecPluginsModule); description = '' - Set of Crowdsec plugins and their configuration (if given). + Set of Crowdsec notification plugins and their configuration (if + given). ''; default = { }; example = lib.literalExpression ''