Skip to content

Commit 601099e

Browse files
authored
syncthing: 1.30.0 -> 2.0.3; nixos/synthing: fix flags against 2.0 (#436432)
2 parents ca48433 + 063267b commit 601099e

5 files changed

Lines changed: 21 additions & 14 deletions

File tree

nixos/doc/manual/release-notes/rl-2505.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
3232
inputs.nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
3333
```
3434

35+
- Syncthing has been updated to version 2.0.0.
36+
3537
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
3638

3739
## New Modules {#sec-release-25.05-new-modules}

nixos/modules/services/networking/syncthing.nix

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -894,14 +894,19 @@ in
894894
install -Dm600 -o ${cfg.user} -g ${cfg.group} ${toString cfg.key} ${cfg.configDir}/key.pem
895895
''}
896896
''}";
897-
ExecStart = ''
898-
${cfg.package}/bin/syncthing \
899-
-no-browser \
900-
-gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \
901-
-config=${cfg.configDir} \
902-
-data=${cfg.databaseDir} \
903-
${escapeShellArgs cfg.extraFlags}
904-
'';
897+
ExecStart =
898+
let
899+
args = lib.escapeShellArgs (
900+
(lib.cli.toGNUCommandLine { } {
901+
"no-browser" = true;
902+
"gui-address" = (if isUnixGui then "unix://" else "") + cfg.guiAddress;
903+
"config" = cfg.configDir;
904+
"data" = cfg.databaseDir;
905+
})
906+
++ cfg.extraFlags
907+
);
908+
in
909+
"${lib.getExe cfg.package} ${args}";
905910
MemoryDenyWriteExecute = true;
906911
NoNewPrivileges = true;
907912
PrivateDevices = true;

nixos/tests/syncthing-folders.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44
name:
55
pkgs.runCommand "syncthing-test-certs-${name}" { } ''
66
mkdir -p $out
7-
${pkgs.syncthing}/bin/syncthing generate --config=$out
7+
${pkgs.syncthing}/bin/syncthing generate --home=$out
88
${pkgs.libxml2}/bin/xmllint --xpath 'string(configuration/device/@id)' $out/config.xml > $out/id
99
'';
1010
idA = genNodeId "a";

nixos/tests/syncthing.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
a.wait_for_open_port(22000)
5656
b.wait_for_open_port(22000)
5757
58-
aDeviceID = a.succeed("syncthing -home=%s -device-id" % confdir).strip()
59-
bDeviceID = b.succeed("syncthing -home=%s -device-id" % confdir).strip()
58+
aDeviceID = a.succeed("syncthing --home=%s device-id" % confdir).strip()
59+
bDeviceID = b.succeed("syncthing --home=%s device-id" % confdir).strip()
6060
addPeer(a, "b", bDeviceID)
6161
addPeer(b, "a", aDeviceID)
6262

pkgs/applications/networking/syncthing/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ let
1919
}:
2020
buildGoModule rec {
2121
pname = stname;
22-
version = "1.30.0";
22+
version = "2.0.3";
2323

2424
src = fetchFromGitHub {
2525
owner = "syncthing";
2626
repo = "syncthing";
2727
tag = "v${version}";
28-
hash = "sha256-GKyzJ2kzs2h/tfb3StSleGBofiKk6FwVcSkCjsJRvRY=";
28+
hash = "sha256-s5kW7FJfLSTezG/PvRGEoBBlMhYUoszpduKFKlnCcaU=";
2929
};
3030

31-
vendorHash = "sha256-Soky/3wEmP1QRy8xfL68sTHi3CSl4nbCINmG0DY2Qys=";
31+
vendorHash = "sha256-Ws++TwmOcWe1ArRuQzIgEIUCHGC30LU4Y4zYUrBkpmA=";
3232

3333
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
3434
# Recent versions of macOS seem to require binaries to be signed when

0 commit comments

Comments
 (0)