Add support for Concraft-pl RTS options
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user