about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorGabriel Arazas <foodogsquared@foodogsquared.one>2023-12-08 17:56:54 +0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-12-08 15:01:23 +0000
commitde29172dd8d0dd88ba5bb329f5ed4ac338c934e3 (patch)
tree1bc72c4c596f592f377f7bc248edd86255faf2bf /nixos/modules
parent7b5db6580c0bb4d901510959132c6ff95c8965bf (diff)
nixos/guix: fix user activation script
(cherry picked from commit 85fcb9b4ef555af76ab54f88e27d9f4c28aec512)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/misc/guix/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/guix/default.nix b/nixos/modules/services/misc/guix/default.nix
index 00e84dc745541..7b468e7067cc2 100644
--- a/nixos/modules/services/misc/guix/default.nix
+++ b/nixos/modules/services/misc/guix/default.nix
@@ -265,7 +265,7 @@ in
         linkProfileToPath = acc: profile: location: let
           guixProfile = "${cfg.stateDir}/guix/profiles/per-user/\${USER}/${profile}";
           in acc + ''
-            [ -d "${guixProfile}" ] && ln -sf "${guixProfile}" "${location}"
+            [ -d "${guixProfile}" ] && [ -L "${location}" ] || ln -sf "${guixProfile}" "${location}"
           '';
 
         activationScript = lib.foldlAttrs linkProfileToPath "" guixUserProfiles;