nixos/guix: fix user activation script

This commit is contained in:
Gabriel Arazas 2023-12-08 17:56:54 +08:00
parent c8a91a280a
commit 85fcb9b4ef
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -265,7 +265,7 @@ in
linkProfileToPath = acc: profile: location: let linkProfileToPath = acc: profile: location: let
guixProfile = "${cfg.stateDir}/guix/profiles/per-user/\${USER}/${profile}"; guixProfile = "${cfg.stateDir}/guix/profiles/per-user/\${USER}/${profile}";
in acc + '' in acc + ''
[ -d "${guixProfile}" ] && ln -sf "${guixProfile}" "${location}" [ -d "${guixProfile}" ] && [ -L "${location}" ] || ln -sf "${guixProfile}" "${location}"
''; '';
activationScript = lib.foldlAttrs linkProfileToPath "" guixUserProfiles; activationScript = lib.foldlAttrs linkProfileToPath "" guixUserProfiles;