|
|
|
@ -134,6 +134,28 @@ in |
|
|
|
|
type = types.listOf types.path; |
|
|
|
|
description = "The list of directories containing external plugins"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
managementPlugin = mkOption { |
|
|
|
|
description = "The options to run the management plugin"; |
|
|
|
|
type = types.submodule { |
|
|
|
|
options = { |
|
|
|
|
enable = mkOption { |
|
|
|
|
default = false; |
|
|
|
|
type = types.bool; |
|
|
|
|
description = '' |
|
|
|
|
Whether to enable the management plugin |
|
|
|
|
''; |
|
|
|
|
}; |
|
|
|
|
port = mkOption { |
|
|
|
|
default = 15672; |
|
|
|
|
type = types.port; |
|
|
|
|
description = '' |
|
|
|
|
On which port to run the management plugin |
|
|
|
|
''; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -158,8 +180,13 @@ in |
|
|
|
|
|
|
|
|
|
services.rabbitmq.configItems = { |
|
|
|
|
"listeners.tcp.1" = mkDefault "${cfg.listenAddress}:${toString cfg.port}"; |
|
|
|
|
} // optionalAttrs cfg.managementPlugin.enable { |
|
|
|
|
"management.tcp.port" = toString cfg.managementPlugin.port; |
|
|
|
|
"management.tcp.ip" = cfg.listenAddress; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
services.rabbitmq.plugins = optional cfg.managementPlugin.enable "rabbitmq_management"; |
|
|
|
|
|
|
|
|
|
systemd.services.rabbitmq = { |
|
|
|
|
description = "RabbitMQ Server"; |
|
|
|
|
|
|
|
|
|