mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Update surrealdb options for v2 (#352681)
This commit is contained in:
commit
668e7e6417
@ -14,9 +14,9 @@ in {
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The path that surrealdb will write data to. Use null for in-memory.
|
The path that surrealdb will write data to. Use null for in-memory.
|
||||||
Can be one of "memory", "file://:path", "tikv://:addr".
|
Can be one of "memory", "rocksdb://:path", "surrealkv://:path", "tikv://:addr", "fdb://:addr".
|
||||||
'';
|
'';
|
||||||
default = "file:///var/lib/surrealdb/";
|
default = "rocksdb:///var/lib/surrealdb/";
|
||||||
example = "memory";
|
example = "memory";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -41,10 +41,9 @@ in {
|
|||||||
extraFlags = lib.mkOption {
|
extraFlags = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "--allow-all" "--auth" "--user root" "--pass root" ];
|
example = [ "--allow-all" "--user" "root" "--pass" "root" ];
|
||||||
description = ''
|
description = ''
|
||||||
Specify a list of additional command line flags,
|
Specify a list of additional command line flags.
|
||||||
which get escaped and are then passed to surrealdb.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -61,7 +60,7 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/surreal start --bind ${cfg.host}:${toString cfg.port} ${lib.escapeShellArgs cfg.extraFlags} -- ${cfg.dbPath}";
|
ExecStart = "${cfg.package}/bin/surreal start --bind ${cfg.host}:${toString cfg.port} ${lib.strings.concatStringsSep " " cfg.extraFlags} -- ${cfg.dbPath}";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
StateDirectory = "surrealdb";
|
StateDirectory = "surrealdb";
|
||||||
|
Loading…
Reference in New Issue
Block a user