From ed6bd220c316649f43f15a6a39d4dd8cd07ba10b Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 22 Aug 2017 04:43:03 +0000 Subject: [PATCH] Use relative path home manager generations link, so it survives garbage collection. --- 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 bd2fb6ff..5d1d66a3 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -355,7 +355,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"