]> git.scottworley.com Git - syncthing-autoregister/commitdiff
Follow nix version bump that changed the eval command line interface
authorScott Worley <scottworley@scottworley.com>
Fri, 22 Apr 2022 21:42:01 +0000 (14:42 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 22 Apr 2022 21:42:09 +0000 (14:42 -0700)
pkgs/syncthing-set-id.nix
tests/automatic-enrollment.nix

index 0277983370b4f1eb1d4347cb4f8f1e585160c165..798213231d28503b9a34210cb62e2eea5ea2db9f 100644 (file)
@@ -21,7 +21,7 @@ writeShellScriptBin "syncthing-set-id" ''
   file=$(realpath "$1")
   name=''${2:-"$HOSTNAME"}
   if (( $# < 3));then
-    configDir=$(${nix}/bin/nix eval --raw '(import <nixos/nixos> {}).config.services.syncthing.configDir')
+    configDir=$(${nix}/bin/nix --experimental-features nix-command eval --impure --raw --expr '(import <nixos/nixos> {}).config.services.syncthing.configDir')
     id=$(${syncthing}/bin/syncthing -home="$configDir" -device-id)
   else
     id=$3
index 184bcc75e99c455f335d888479f8866f01b95c1d..9b0b76f0d0a7fcdc3c951b8ecfc97d95920c8d8a 100644 (file)
@@ -97,7 +97,7 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
 
       def verifyDeviceIDSet(machine, expectedDevice):
           machine.wait_until_succeeds(
-              '(( "$(nix eval --raw -f "<nixos/nixos>" config.services.syncthing.declarative.devices.%s.id | wc -c)" == 63 ))'
+              '(( "$(nix --experimental-features nix-command eval --impure --raw --expr "(import <nixos/nixos> {}).config.services.syncthing.declarative.devices.%s.id" | wc -c)" == 63 ))'
               % expectedDevice
           )