aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--terraform/aws/backend/main.tf8
1 files changed, 5 insertions, 3 deletions
diff --git a/terraform/aws/backend/main.tf b/terraform/aws/backend/main.tf
index 66b273b..4fb499e 100644
--- a/terraform/aws/backend/main.tf
+++ b/terraform/aws/backend/main.tf
@@ -304,12 +304,14 @@ EOF
"sudo systemctl enable guix-daemon.service",
"sudo systemctl start guix-daemon.service",
"mkdir -p ~/.config", # Make the ~/.config directory, to ensure it's owned by ubuntu
+ # Setup the profile for the ubuntu user
<<EOF
if [ ! -d "/var/guix/profiles/per-user/ubuntu" ]; then
- /var/guix/profiles/per-user/root/guix-profile/bin/guix package -i guile guix
-else
- ln -s /var/guix/profiles/per-user/ubuntu/guix-profile ~/.guix-profile
+ cp -r /var/guix/profiles/per-user/root/guix-profile-1-link /var/guix/profiles/per-user/ubuntu/
+ ln -s /var/guix/profiles/per-user/ubuntu/guix-profile-1-link /var/guix/profiles/per-user/ubuntu/guix-profile
+ /var/guix/profiles/per-user/ubuntu/guix-profile/bin/guix package -i guile
fi
+ln -s /var/guix/profiles/per-user/ubuntu/guix-profile ~/.guix-profile
EOF
,
# This is needed for things like guix copy to work