all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Installing guix on nixos system
@ 2020-03-16 12:15 Roy Lemmon
  2020-03-16 14:34 ` Pierre Neidhardt
  2020-03-16 16:52 ` Leo Famulari
  0 siblings, 2 replies; 8+ messages in thread
From: Roy Lemmon @ 2020-03-16 12:15 UTC (permalink / raw)
  To: help-guix

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

https://www.gnu.org/software/guix/
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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-16 12:15 Installing guix on nixos system Roy Lemmon
@ 2020-03-16 14:34 ` Pierre Neidhardt
  2020-03-16 14:39   ` Roy Lemmon
  2020-03-18 13:38   ` Roy Lemmon
  2020-03-16 16:52 ` Leo Famulari
  1 sibling, 2 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-16 14:34 UTC (permalink / raw)
  To: Roy Lemmon, help-guix

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

I haven't tried it, but this link might help you:

https://euandre.org/2018/07/17/running-guix-on-nixos.html

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-16 14:34 ` Pierre Neidhardt
@ 2020-03-16 14:39   ` Roy Lemmon
  2020-03-18 13:38   ` Roy Lemmon
  1 sibling, 0 replies; 8+ messages in thread
From: Roy Lemmon @ 2020-03-16 14:39 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Thank you. I will take a look at that link. It does indeed look helpful.

Cheers
Roy.

On Mon, Mar 16, 2020 at 2:34 PM Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> I haven't tried it, but this link might help you:
>
> https://euandre.org/2018/07/17/running-guix-on-nixos.html
>
> --
> Pierre Neidhardt
> https://ambrevar.xyz/
>


-- 
********************************
Roy Lemmon
STFC Daresbury Laboratory
United Kingdom
********************************

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-16 12:15 Installing guix on nixos system Roy Lemmon
  2020-03-16 14:34 ` Pierre Neidhardt
@ 2020-03-16 16:52 ` Leo Famulari
  1 sibling, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2020-03-16 16:52 UTC (permalink / raw)
  To: Roy Lemmon; +Cc: help-guix

On Mon, Mar 16, 2020 at 12:15:53PM +0000, Roy Lemmon wrote:
> 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.

Did you try installing the guix-daemon.service file by hand? Did you
check the permissions of '/etc', and '/etc/systemd', etc?

Did you try putting the guix-daemon.service in root's systemd service
directory, '/root/.config/systemd'?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-16 14:34 ` Pierre Neidhardt
  2020-03-16 14:39   ` Roy Lemmon
@ 2020-03-18 13:38   ` Roy Lemmon
  2020-03-19  9:21     ` Marius Bakke
  1 sibling, 1 reply; 8+ messages in thread
From: Roy Lemmon @ 2020-03-18 13:38 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Hi All,

I have followed the instructions in that link and successfully installed
the build users and guix daemon on my nixos system. As root, I can run

guix package -i hello

and the hello package is installed and I can run it.

However I am having trouble setting up the environment for running guix as
a user (I am on my laptop, so there is only one user). guix is of course
not recognised as a command when I am the user. I can run it as
/usr/local/bin/guix so that is ok and I could put that in my PATH. But is
that all I need to do ? I am not sure where the guix packages are installed
as a user rather than root.

Thanks
Roy.


On Mon, Mar 16, 2020 at 2:34 PM Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> I haven't tried it, but this link might help you:
>
> https://euandre.org/2018/07/17/running-guix-on-nixos.html
>
> --
> Pierre Neidhardt
> https://ambrevar.xyz/
>


-- 
********************************
Roy Lemmon
STFC Daresbury Laboratory
United Kingdom
********************************

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-18 13:38   ` Roy Lemmon
@ 2020-03-19  9:21     ` Marius Bakke
  2020-03-19 13:17       ` Roy Lemmon
  0 siblings, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2020-03-19  9:21 UTC (permalink / raw)
  To: Roy Lemmon, Pierre Neidhardt; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

Roy Lemmon <roy@roylemmon.com> writes:

> Hi All,
>
> I have followed the instructions in that link and successfully installed
> the build users and guix daemon on my nixos system. As root, I can run
>
> guix package -i hello
>
> and the hello package is installed and I can run it.
>
> However I am having trouble setting up the environment for running guix as
> a user (I am on my laptop, so there is only one user). guix is of course
> not recognised as a command when I am the user. I can run it as
> /usr/local/bin/guix so that is ok and I could put that in my PATH. But is
> that all I need to do ? I am not sure where the guix packages are installed
> as a user rather than root.

I haven't read the linked blog post, but I think the next step is to use
the Guix in /usr/local/bin to run 'guix pull' as your user.  That will
install the latest version of Guix in ~/.config/guix/current.

Afterwards, make sure ~/.config/guix/current/bin comes first in PATH,
then you should be able to use Guix normally.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-19  9:21     ` Marius Bakke
@ 2020-03-19 13:17       ` Roy Lemmon
  2020-03-21 18:39         ` Pierre Neidhardt
  0 siblings, 1 reply; 8+ messages in thread
From: Roy Lemmon @ 2020-03-19 13:17 UTC (permalink / raw)
  To: Marius Bakke; +Cc: help-guix

Hi Marius et al.,

Thanks for your help. That is clearer now. In fact that is what I did, ran
'guix pull' as user and the latest version of guix is installed in
~/.config/guix/current.

My problem now is that I can run guix from there if I use the full path
name:

$ ~/.config/guix/current/bin/guix --help

But if I just run:

$ guix --help

it doesn't recognise the command. Normally this would just be because I
have not added that directory to PATH as you say.

However here is the problem. I am using eshell in emacs. I have tried the
following:

$ (setenv "PATH" (concat "/home/rlemmon/.config/guix/current/bin:" (getenv
"PATH")))
$ addpath /home/rlemmon/.config/guix/current/bin

But still the same problem. I understand this is now an eshell problem
rather than a guix one. But if anyone has encountered this before ... ? Its
a frustrating problem !

Thanks
Roy.

On Thu, Mar 19, 2020 at 9:21 AM Marius Bakke <mbakke@fastmail.com> wrote:

> Roy Lemmon <roy@roylemmon.com> writes:
>
> > Hi All,
> >
> > I have followed the instructions in that link and successfully installed
> > the build users and guix daemon on my nixos system. As root, I can run
> >
> > guix package -i hello
> >
> > and the hello package is installed and I can run it.
> >
> > However I am having trouble setting up the environment for running guix
> as
> > a user (I am on my laptop, so there is only one user). guix is of course
> > not recognised as a command when I am the user. I can run it as
> > /usr/local/bin/guix so that is ok and I could put that in my PATH. But is
> > that all I need to do ? I am not sure where the guix packages are
> installed
> > as a user rather than root.
>
> I haven't read the linked blog post, but I think the next step is to use
> the Guix in /usr/local/bin to run 'guix pull' as your user.  That will
> install the latest version of Guix in ~/.config/guix/current.
>
> Afterwards, make sure ~/.config/guix/current/bin comes first in PATH,
> then you should be able to use Guix normally.
>


-- 
********************************
Roy Lemmon
STFC Daresbury Laboratory
United Kingdom
********************************

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing guix on nixos system
  2020-03-19 13:17       ` Roy Lemmon
@ 2020-03-21 18:39         ` Pierre Neidhardt
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2020-03-21 18:39 UTC (permalink / raw)
  To: Roy Lemmon, Marius Bakke; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi Roy,

> $ (setenv "PATH" (concat "/home/rlemmon/.config/guix/current/bin:" (getenv
> "PATH")))
> $ addpath /home/rlemmon/.config/guix/current/bin

Just tested this with Emacs 26.3, it works for me.

What's the result of the following commands in Eshell?

which guix
*which guix

Anyways, you should probably set the PATH environment during login,
e.g. in your ~/.bash_profile or ~/.profile.  This way the correct
environment variables will get automatically propagated to all your
applications.

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-21 18:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16 12:15 Installing guix on nixos system Roy Lemmon
2020-03-16 14:34 ` Pierre Neidhardt
2020-03-16 14:39   ` Roy Lemmon
2020-03-18 13:38   ` Roy Lemmon
2020-03-19  9:21     ` Marius Bakke
2020-03-19 13:17       ` Roy Lemmon
2020-03-21 18:39         ` Pierre Neidhardt
2020-03-16 16:52 ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.