Add support for Concraft-pl RTS options

This commit is contained in:
2026-01-09 21:42:09 +01:00
parent bad1211c29
commit 7f298a5e4c
3 changed files with 7 additions and 9 deletions

View File

@@ -11,14 +11,14 @@ self: {
# { host = "0.0.0.0"; port = 8888; } -> "--host '0.0.0.0' --port '8888'"
attrsToArgs = attrs:
lib.concatStringsSep " " (
lib.mapAttrsToList (name: value: "--${name} ${lib.escapeShellArg (toString value)}") attrs
lib.mapAttrsToList (name: value: "--${name} '${lib.escapeShellArg (toString value)}'") attrs
);
# Helper function to convert attrset to CLI arguments with prefix
# { port = 3000; bin = "..."; } -> "--ccpl-port '3000' --ccpl-bin '...'"
attrsToArgsWithPrefix = prefix: attrs:
lib.concatStringsSep " " (
lib.mapAttrsToList (name: value: "--${prefix}-${name} ${lib.escapeShellArg (toString value)}") attrs
lib.mapAttrsToList (name: value: "--${prefix}-${name} '${lib.escapeShellArg (toString value)}'") attrs
);
in {
options.services.conmorfeusz = {