Guix on Fedora, SELinux remounting writable permission denied

I’m trying to install Guix as a package manager on Fedora Workstation 42. I think I’m running into some SELinux issues.

I installed Guix (1.4) with the script: https://guix.gnu.org/install.sh

I’m seeing this error.

$ guix pull
guix pull: error: remounting /gnu/store writable: Permission denied

I noticed if I run sudo setenforce 0, then try guix pull, everything works… but obviously that’s a pretty heavy-handed solution… I’d like to not disable SELinux.

OK, the commands from here helped.

$ sudo semodule -i /var/guix/profiles/per-user/root/current-guix/share/selinux/guix-daemon.cil
$ sudo mount -o remount,rw /gnu/store
$ sudo restorecon -R /gnu /var/guix
$ sudo systemctl restart guix-daemon

However, whenever I open a shell I’m getting this. Seems like there’s a broken symlink…

bash: /home/me/.guix-profile/etc/profile: No such  file  or directory
$ ls -l /home/me/.guix-profile                                                                                                                                               
lrwxrwxrwx. 1 me me 46 Aug  1 16:34 /home/me/.guix-profile -> /var/guix/profiles/per-user/me/guix-profile                                                                    
$ ls -l /var/guix/profiles/per-user/me/guix-profile                                                                                                                          
ls: cannot access '/var/guix/profiles/per-user/me/guix-profile': No such file or directory

I did a bunch of stuff in between. I don’t remember what exactly, so maybe I just need to do clean install… if only I could --roll-back…

Update
I deleted all the symlinks I had in my home directory, then ran guix home reconfigure home.scm, rebooted my machine for good luck, and now everything works! No errors! :partying_face:

Another update: The guix-daemon hit permission denied again… not entirely sure why… I suspect it might be because I did a sudo guix pull last night and maybe that did something…

Anyway, I re-ran:

$ sudo semodule -i /var/guix/profiles/per-user/root/current-guix/share/selinux/guix-daemon.cil
$ sudo mount -o remount,rw /gnu/store
$ sudo restorecon -R /gnu /var/guix
$ sudo systemctl restart guix-daemon

And everything seems to be working again… I rebooted my computer and didn’t hit the permission denied errors after running those commands… so I guess I’m good.