From 42f5d4404d9b938f13016cb2ba0851a9154bb4b3 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. --- 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 50401e0f0..12317e36e 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"