From bb6ab331f8d4597764527154372f57aa77271a1b Mon Sep 17 00:00:00 2001 From: Benoit Donneaux <benoit@leastauthority.com> Date: Wed, 21 Jun 2023 14:43:16 +0000 Subject: [PATCH] Make CD great again --- nixos/modules/update-deployment | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/update-deployment b/nixos/modules/update-deployment index a0d233a6..cd41a236 100755 --- a/nixos/modules/update-deployment +++ b/nixos/modules/update-deployment @@ -79,7 +79,11 @@ ssh -o StrictHostKeyChecking=no "$(hostname).$(domainname)" ":" # # So instead, import our nixpkgs which forces it to be instantiated in the # store, then ask for its path, then set NIX_PATH to that. -export NIX_PATH="nixpkgs=$(nix eval "(import ${CHECKOUT}/nixpkgs.nix { }).path")" + +# Two lines since 'export' masks 'set -e' +# See https://mywiki.wooledge.org/BashFAQ/105#line-204 +NIX_PATH="nixpkgs=$(nix --extra-experimental-features nix-command eval --impure --expr "(import ${CHECKOUT}/nixpkgs.nix { }).path")" +export NIX_PATH # Attempt to update just this host. Choose the morph grid definition matching # the grid we belong to and limit the morph deployment update to the host -- GitLab