From 7a3e2cc0634dc09a5d3f846d4224771e51253604 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 1 Feb 2020 14:15:24 +0100 Subject: [PATCH] files: use `nix-env` to create profile links --- modules/files.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/files.nix b/modules/files.nix index 94b3aa565..bd0528856 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -197,8 +197,7 @@ in if [[ ! -v oldGenPath || "$oldGenPath" != "$newGenPath" ]] ; then echo "Creating profile generation $newGenNum" - $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenProfilePath" - $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG $(basename "$newGenProfilePath") "$genProfilePath" + $DRY_RUN_CMD nix-env $VERBOSE_ARG --profile "$genProfilePath" --set "$newGenPath" $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath" else echo "No change so reusing latest profile generation $oldGenNum"