Merge pull request #265193 from 0z13/opensearch-module-link-plugins

nixos/opensearch: link plugins from opensearch package

authored by

Sarah Brofeldt and committed by
GitHub
54f00576 b7b91c7a

+19
+19
nixos/modules/services/search/opensearch.nix
··· 72 72 The port to listen on for transport traffic. 73 73 ''; 74 74 }; 75 + 76 + options."plugins.security.disabled" = lib.mkOption { 77 + type = lib.types.bool; 78 + default = true; 79 + description = lib.mdDoc '' 80 + Whether to enable the security plugin, 81 + `plugins.security.ssl.transport.keystore_filepath` or 82 + `plugins.security.ssl.transport.server.pemcert_filepath` and 83 + `plugins.security.ssl.transport.client.pemcert_filepath` 84 + must be set for this plugin to be enabled. 85 + ''; 86 + }; 75 87 }; 76 88 77 89 default = {}; ··· 186 198 shopt -s inherit_errexit 187 199 188 200 # Install plugins 201 + 202 + # remove plugins directory if it is empty. 203 + if [ -z "$(ls -A ${cfg.dataDir}/plugins)" ]; then 204 + rm -r "${cfg.dataDir}/plugins" 205 + fi 206 + 207 + ln -sfT "${cfg.package}/plugins" "${cfg.dataDir}/plugins" 189 208 ln -sfT ${cfg.package}/lib ${cfg.dataDir}/lib 190 209 ln -sfT ${cfg.package}/modules ${cfg.dataDir}/modules 191 210