Install guix on nixos system

Hi,

I am trying to install guix on my nixos system. I am using the shell script provided on the guix installation page:

https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh

All works well until the script tries to install the guix-daemon service. It cannot install it in /etc/systemd/system and so the daemon cannot be started. See below.

Has anyone come across this problem ? I thought /etc filesystem was writeable as that is where configuration.nix lives.

Thanks
Roy.


This script installs GNU Guix on your system

Press return to continue…
[1584356742.078]: Starting installation (Mon Mar 16 11:05:42 GMT 2020)
[1584356742.082]: [ PASS ] verification of required commands completed
[1584356742.155]: [ INFO ] init system is: systemd
[1584356742.160]: [ INFO ] system is x86_64-linux
[1584356742.629]: [ PASS ] Release for your system: guix-binary-1.0.1.x86_64-linux
[1584356742.632]: [ INFO ] Downloading Guix release archive
guix-binary-1.0.1.x86_64-linux.tar.xz 100%[==========================================================================================================================================>] 59.66M 2.03MB/s in 18s
guix-binary-1.0.1.x86_64-linux.tar.xz.sig 100%[==========================================================================================================================================>] 833 --.-KB/s in 0s
[1584356761.087]: [ PASS ] download completed.
[1584356761.383]: [ PASS ] Signature is valid.
[1584356765.721]: [ PASS ] unpacked archive
[1584356765.722]: [ INFO ] Installing /var/guix and /gnu…
[1584356765.728]: [ INFO ] Linking the root user’s profile
[1584356765.733]: [ PASS ] activated root profile at /root/.config/guix/current
[1584356765.765]: [ PASS ] group created
[1584356765.797]: [ PASS ] user added
[1584356765.868]: [ PASS ] user added
[1584356766.000]: [ PASS ] user added
[1584356766.049]: [ PASS ] user added
[1584356766.091]: [ PASS ] user added
[1584356766.126]: [ PASS ] user added
[1584356766.161]: [ PASS ] user added
[1584356766.196]: [ PASS ] user added
[1584356766.231]: [ PASS ] user added
[1584356766.266]: [ PASS ] user added
cp: cannot create regular file ‘/etc/systemd/system/guix-daemon.service’: Read-only file system
chmod: cannot access ‘/etc/systemd/system/guix-daemon.service’: No such file or directory
sed: can’t read /etc/systemd/system/guix-daemon.service: No such file or directory
grep: /etc/systemd/system/guix-daemon.service: No such file or directory
sed: -e expression #1, char 56: unterminated `s’ command
Failed to start guix-daemon.service: Unit guix-daemon.service not found.
[1584356766.487]: [ INFO ] making the guix command available to other users
Permit downloading pre-built package binaries from the project’s build farm? (yes/no) yes
[1584356792.240]: [ PASS ] Authorized public key for ci.guix.gnu.org
[1584356792.245]: [ INFO ] cleaning up /tmp/guix.Hk6
[1584356792.259]: [ PASS ] Guix has successfully been installed!
[1584356792.261]: [ INFO ] Run ‘info guix’ to read the manual.

This is a symlink to /etc/static/systemd/system, which is read-only. So the proper way to do this is to specify the guix daemon via systemd.services in the nixos configuration.

There is also a PR to package it for NixOS: package request: guix · Issue #75669 · NixOS/nixpkgs · GitHub

1 Like