From: Scott Worley Date: Fri, 22 Apr 2022 21:42:01 +0000 (-0700) Subject: Follow nix version bump that changed the eval command line interface X-Git-Url: http://git.scottworley.com/syncthing-autoregister/commitdiff_plain/274332f765ef56a9ca46f83859f5208849cb4c30 Follow nix version bump that changed the eval command line interface --- diff --git a/pkgs/syncthing-set-id.nix b/pkgs/syncthing-set-id.nix index 0277983..7982132 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 diff --git a/tests/automatic-enrollment.nix b/tests/automatic-enrollment.nix index 184bcc7..9b0b76f 100644 --- a/tests/automatic-enrollment.nix +++ b/tests/automatic-enrollment.nix @@ -97,7 +97,7 @@ import ({ pkgs, lib, ... }: def verifyDeviceIDSet(machine, expectedDevice): machine.wait_until_succeeds( - '(( "$(nix eval --raw -f "" config.services.syncthing.declarative.devices.%s.id | wc -c)" == 63 ))' + '(( "$(nix --experimental-features nix-command eval --impure --raw --expr "(import {}).config.services.syncthing.declarative.devices.%s.id" | wc -c)" == 63 ))' % expectedDevice )