home-environment: add link for current profile
This link is needed to make the `delete-older-than` option for `nix-collect-garbage` work as expected.
This commit is contained in:
parent
119c7b2538
commit
6794efdf68
|
@ -20,6 +20,7 @@ function setupVars() {
|
|||
oldGenPath="$(readlink -e "$gcPath/current-home")"
|
||||
fi
|
||||
|
||||
genProfilePath="$profilesPath/home-manager"
|
||||
newGenPath="@GENERATION_DIR@";
|
||||
newGenProfilePath="$profilesPath/home-manager-$newGenNum-link"
|
||||
newGenGcPath="$gcPath/current-home"
|
||||
|
@ -52,3 +53,4 @@ $VERBOSE_ECHO " oldGenPath=$oldGenPath"
|
|||
$VERBOSE_ECHO " newGenPath=$newGenPath"
|
||||
$VERBOSE_ECHO " newGenProfilePath=$newGenProfilePath"
|
||||
$VERBOSE_ECHO " newGenGcPath=$newGenGcPath"
|
||||
$VERBOSE_ECHO " genProfilePath=$genProfilePath"
|
||||
|
|
|
@ -276,6 +276,7 @@ in
|
|||
|
||||
if [[ "$oldGenPath" != "$newGenPath" ]] ; then
|
||||
$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 "$newGenPath" "$newGenGcPath"
|
||||
linkNewGen
|
||||
cleanOldGen
|
||||
|
|
Loading…
Reference in a new issue