nixos/syncthing: fix flags against 2.0 release
This commit is contained in:
@@ -32,6 +32,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
|
||||
inputs.nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
|
||||
```
|
||||
|
||||
- Syncthing has been updated to version 2.0.0.
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
## New Modules {#sec-release-25.05-new-modules}
|
||||
|
||||
@@ -894,14 +894,19 @@ in
|
||||
install -Dm600 -o ${cfg.user} -g ${cfg.group} ${toString cfg.key} ${cfg.configDir}/key.pem
|
||||
''}
|
||||
''}";
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/syncthing \
|
||||
-no-browser \
|
||||
-gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \
|
||||
-config=${cfg.configDir} \
|
||||
-data=${cfg.databaseDir} \
|
||||
${escapeShellArgs cfg.extraFlags}
|
||||
'';
|
||||
ExecStart =
|
||||
let
|
||||
args = lib.escapeShellArgs (
|
||||
(lib.cli.toGNUCommandLine { } {
|
||||
"no-browser" = true;
|
||||
"gui-address" = (if isUnixGui then "unix://" else "") + cfg.guiAddress;
|
||||
"config" = cfg.configDir;
|
||||
"data" = cfg.databaseDir;
|
||||
})
|
||||
++ cfg.extraFlags
|
||||
);
|
||||
in
|
||||
"${lib.getExe cfg.package} ${args}";
|
||||
MemoryDenyWriteExecute = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateDevices = true;
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
name:
|
||||
pkgs.runCommand "syncthing-test-certs-${name}" { } ''
|
||||
mkdir -p $out
|
||||
${pkgs.syncthing}/bin/syncthing generate --config=$out
|
||||
${pkgs.syncthing}/bin/syncthing generate --home=$out
|
||||
${pkgs.libxml2}/bin/xmllint --xpath 'string(configuration/device/@id)' $out/config.xml > $out/id
|
||||
'';
|
||||
idA = genNodeId "a";
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
a.wait_for_open_port(22000)
|
||||
b.wait_for_open_port(22000)
|
||||
|
||||
aDeviceID = a.succeed("syncthing -home=%s -device-id" % confdir).strip()
|
||||
bDeviceID = b.succeed("syncthing -home=%s -device-id" % confdir).strip()
|
||||
aDeviceID = a.succeed("syncthing --home=%s device-id" % confdir).strip()
|
||||
bDeviceID = b.succeed("syncthing --home=%s device-id" % confdir).strip()
|
||||
addPeer(a, "b", bDeviceID)
|
||||
addPeer(b, "a", aDeviceID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user