mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
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
@ -434,6 +434,15 @@ in {
|
|||||||
defaultText = literalExample "dataDir${optionalString cond " + \"/.config/syncthing\""}";
|
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 {
|
openDefaultPorts = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -526,7 +535,7 @@ in {
|
|||||||
${cfg.package}/bin/syncthing \
|
${cfg.package}/bin/syncthing \
|
||||||
-no-browser \
|
-no-browser \
|
||||||
-gui-address=${cfg.guiAddress} \
|
-gui-address=${cfg.guiAddress} \
|
||||||
-home=${cfg.configDir}
|
-home=${cfg.configDir} ${escapeShellArgs cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
MemoryDenyWriteExecute = true;
|
MemoryDenyWriteExecute = true;
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user