Merge pull request #136090 from jakubgs/more-syncthing-options
More syncthing options
This commit is contained in:
commit
4a57860df4
|
@ -9,7 +9,7 @@ let
|
|||
|
||||
devices = mapAttrsToList (name: device: {
|
||||
deviceID = device.id;
|
||||
inherit (device) name addresses introducer;
|
||||
inherit (device) name addresses introducer autoAcceptFolders;
|
||||
}) cfg.devices;
|
||||
|
||||
folders = mapAttrsToList ( _: folder: {
|
||||
|
@ -149,6 +149,15 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
autoAcceptFolders = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Automatically create or share folders that this device advertises at the default path.
|
||||
See <link xlink:href="https://docs.syncthing.net/users/config.html?highlight=autoaccept#config-file-format"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
@ -425,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;
|
||||
|
@ -517,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