From 95327eb5cdc0a2c4b761c4421d97defaf998b89e Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 22 Aug 2017 04:43:03 +0000 Subject: [PATCH] home-environment: use relative latest profile link Using a relative path prevents the latest version from being garbage collected. (cherry picked from commit 42f5d4404d9b938f13016cb2ba0851a9154bb4b3) --- modules/home-environment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 80092c6e6..4d35c75cf 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -359,7 +359,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 "$newGenProfilePath" "$genProfilePath" + $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG $(basename "$newGenProfilePath") "$genProfilePath" $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath" else echo "No change so reusing latest profile generation $oldGenNum"