syncthing: add extraFlags option that adjust service
This is useful for situations in which you might want to reset certain things using `--reset-database` or `--reset-deltas` or debug certain things using any of the debug options like `--debug-perf-stats`. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
b991f1e448
commit
972a365488
1 changed files with 10 additions and 1 deletions
|
@ -434,6 +434,15 @@ in {
|
|||
defaultText = literalExample "dataDir${optionalString cond " + \"/.config/syncthing\""}";
|
||||
};
|
||||
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "--reset-deltas" ];
|
||||
description = ''
|
||||
Extra flags passed to the syncthing command in the service definition.
|
||||
'';
|
||||
};
|
||||
|
||||
openDefaultPorts = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -526,7 +535,7 @@ in {
|
|||
${cfg.package}/bin/syncthing \
|
||||
-no-browser \
|
||||
-gui-address=${cfg.guiAddress} \
|
||||
-home=${cfg.configDir}
|
||||
-home=${cfg.configDir} ${escapeShellArgs cfg.extraFlags}
|
||||
'';
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
|
|
Loading…
Reference in a new issue