diff options
author | Naïm Favier <n@monade.li> | 2021-07-27 18:15:41 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2021-07-28 10:56:06 +0200 |
commit | 6416b3a941079e069c76a96d235dedc6d5eb9385 (patch) | |
tree | 7b1bf5ce5e2e070ec52af7d5fd5c0e0b677ff126 /nixos/tests/syncthing.nix | |
parent | 6b639470214f721ea3aed1a6136b56ddbffa3df0 (diff) | |
download | nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar.gz nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar.bz2 nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar.lz nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar.xz nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.tar.zst nixpkgs-6416b3a941079e069c76a96d235dedc6d5eb9385.zip |
nixos/syncthing: add declarative.extraOptions
Allows setting arbitrary config options through the REST API. Also switches to the [new](https://docs.syncthing.net/rest/config.html) config endpoints.
Diffstat (limited to 'nixos/tests/syncthing.nix')
-rw-r--r-- | nixos/tests/syncthing.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/tests/syncthing.nix b/nixos/tests/syncthing.nix index 5536b7055cc..aff1d874413 100644 --- a/nixos/tests/syncthing.nix +++ b/nixos/tests/syncthing.nix @@ -25,7 +25,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { "xmllint --xpath 'string(configuration/gui/apikey)' %s/config.xml" % confdir ).strip() oldConf = host.succeed( - "curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config" % APIKey + "curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/config" % APIKey ) conf = json.loads(oldConf) conf["devices"].append({"deviceID": deviceID, "id": name}) @@ -39,7 +39,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { ) newConf = json.dumps(conf) host.succeed( - "curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config -d %s" + "curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/config -X PUT -d %s" % (APIKey, shlex.quote(newConf)) ) |