about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorGabriel Arazas <foodogsquared@foodogsquared.one>2023-12-08 17:56:54 +0800
committerGabriel Arazas <foodogsquared@foodogsquared.one>2023-12-08 17:56:54 +0800
commit85fcb9b4ef555af76ab54f88e27d9f4c28aec512 (patch)
treeec301106b0866707d03250d48a092a151277092f /nixos
parentc8a91a280a29268aa99750e50befa5473827f40f (diff)
downloadnixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar.gz
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar.bz2
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar.lz
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar.xz
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.tar.zst
nixlib-85fcb9b4ef555af76ab54f88e27d9f4c28aec512.zip
nixos/guix: fix user activation script
Diffstat (limited to 'nixos')
-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 00e84dc74554..7b468e7067cc 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;