From 81a0fdb84e8d0422efc9ce8dc278de843c1e89e2 Mon Sep 17 00:00:00 2001 From: Benoit Donneaux <benoit@leastauthority.com> Date: Fri, 12 May 2023 12:11:40 +0200 Subject: [PATCH] Avoid silent failure in export Co-authored-by: Florian Sesser <florian@leastauthority.com> Signed-off-by: Benoit Donneaux <benoit@leastauthority.com> --- 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..9bc82489 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 eval "(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