chore: Provide scripts to start the containers

This commit is contained in:
Alexander Kobjolke 2024-11-09 23:14:19 +01:00
parent 24795af52b
commit 06aab542bf
4 changed files with 39 additions and 15 deletions

View file

@ -5,7 +5,7 @@
...
}:
let
cfg = config.services.apache-kafka;
cfg = config.services.kafka;
# The `javaProperties` generator takes care of various escaping rules and
# generation of the properties file, but we'll handle stringly conversion
@ -56,7 +56,7 @@ let
'';
in
{
options.services.apache-kafka = {
options.services.kafka = {
enable = lib.mkEnableOption "Apache Kafka event streaming broker";
settings = lib.mkOption {
@ -100,7 +100,7 @@ in
See [listeners](https://kafka.apache.org/documentation/#brokerconfigs_listeners).
'';
type = lib.types.listOf lib.types.str;
default = [ "PLAINTEXT://localhost:29092" ];
default = [ "PLAINTEXT://localhost:9092" ];
};
};
};
@ -181,13 +181,13 @@ in
};
config = lib.mkIf cfg.enable {
services.apache-kafka.configFiles.serverProperties = generator "server.properties" stringlySettings;
services.kafka.configFiles.serverProperties = generator "server.properties" stringlySettings;
scripts.kaf.exec = ''
exec ${pkgs.kaf}/bin/kaf --config ${kafConfig} "$@"
'';
processes.apache-kafka = {
processes.kafka = {
exec = "${startScript}";
# process-compose = {