diff --git a/nixos/modules/update-deployment b/nixos/modules/update-deployment
index cc8dd9968fb2cc6c7fc429f877df231dcc729d18..90adc6ff6c6b5223dadc71e81fced59f99f7b611 100755
--- a/nixos/modules/update-deployment
+++ b/nixos/modules/update-deployment
@@ -75,8 +75,15 @@ EOF
 # Make sure known_hosts has the host key in it.
 ssh -o StrictHostKeyChecking=no "$(hostname).$(domainname)" ":"
 
-# Set nixpkgs to our preferred version for the morph build.
-export NIX_PATH="nixpkgs=${CHECKOUT}/nixpkgs-2105.nix"
+# Set nixpkgs to our preferred version for the morph build.  Annoyingly, we
+# can't just use nixpkgs-2105.nix as our nixpkgs because some code (in morph,
+# at least) wants <nixpkgs> to be a fully-resolved path to a nixpkgs tree.
+# For example, morph evaluated `import <nixpkgs/lib>` which would turn into
+# something like `import nixpkgs-2105.nix/lib` which is nonsense.
+#
+# 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-2105.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