X-Git-Url: http://git.scottworley.com/syncthing-autoregister/blobdiff_plain/aaeffc92aa6bf5a33cc56e7ee41d15ccaf240b2a..22596d7545d0ae9b24e10da7aad75195c0c0d875:/pkgs/syncthing-set-id.nix?ds=inline diff --git a/pkgs/syncthing-set-id.nix b/pkgs/syncthing-set-id.nix index 0277983..f20798d 100644 --- a/pkgs/syncthing-set-id.nix +++ b/pkgs/syncthing-set-id.nix @@ -21,7 +21,7 @@ writeShellScriptBin "syncthing-set-id" '' file=$(realpath "$1") name=''${2:-"$HOSTNAME"} if (( $# < 3));then - configDir=$(${nix}/bin/nix eval --raw '(import {}).config.services.syncthing.configDir') + configDir=$(${nix}/bin/nix --experimental-features nix-command eval --impure --raw --expr '(import {}).config.services.syncthing.configDir') id=$(${syncthing}/bin/syncthing -home="$configDir" -device-id) else id=$3 @@ -44,7 +44,7 @@ writeShellScriptBin "syncthing-set-id" '' { file, name, id }: let pkgs = import { }; in pkgs.lib.generators.toPretty { } (pkgs.lib.recursiveUpdate (import file) { - services.syncthing.declarative.devices."''${name}".id = id; + services.syncthing.devices."''${name}".id = id; }) ' | ${jq}/bin/jq -r | ${nixfmt}/bin/nixfmt > "$tmp"