unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
To: help-guix@gnu.org
Subject: Re: How to enable server discovery in foreign distro?
Date: Fri, 19 May 2023 20:18:01 +0000	[thread overview]
Message-ID: <CAGxMbPZOa0p905SWOX2Nm9_oMxP+d2skD-HHNKhAL+OndFqbCA@mail.gmail.com> (raw)
In-Reply-To: <CAGxMbPbMbiJ3Dj6rvQfjn74+N5b964h=SrK28KuC+Qu3htjv-A@mail.gmail.com>

Table of Contents
_________________

1. The solution
2. Pending question


1 The solution
==============

  I managed to do it. I'll share some relevant information for those
  interested.

  [This section] in the Info manual helped me do what I was looking
  for. As specified in that part of the manual, I need to edit
  guix-daemon.service. In my system, there were 4 files with that name
  (see code block below)

  ,----
  | rdrg@desktop:~$ locate -r 'guix-daemon.service$'
  | /etc/systemd/system/multi-user.target.wants/guix-daemon.service
  | /run/systemd/units/invocation:guix-daemon.service
  | /usr/lib/systemd/system/guix-daemon.service
  | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service
  `----

  The file `/run/systemd/units/invocation:guix-daemon.service' was a
  broken symbolic link (see code block below), so I knew that I
  shouldn't edit this file.

  ,----
  | rdrg@desktop:~$ file /run/systemd/units/invocation:guix-daemon.service
  | /run/systemd/units/invocation:guix-daemon.service: broken symbolic
link to 8dbd9f7458e74f979a2b8d214ed47d42
  `----

  The file
  `/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service'
  wsa empty (see code block below), so I knew that I shouldn't edit this
  file.

  ,----
  | rdrg@desktop:~$ file
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service
  | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service:
empty
  `----

  The file
  `/etc/systemd/system/multi-user.target.wants/guix-daemon.service' was
  a symbolic link to `/usr/lib/systemd/system/guix-daemon.service' and,
  for that reason, I ended up editing
  `/usr/lib/systemd/system/guix-daemon.service'. I edited the line
  containing `ExecStart' and added the IP address of my system from
  which I wanted to retrieve the packages.

  ,----
  | rdrg@desktop:~$ cat /usr/lib/systemd/system/guix-daemon.service
  | # This is a "service unit file" for the systemd init system to launch
  | # 'guix-daemon'.  Drop it in /etc/systemd/system or similar to have
  | # 'guix-daemon' automatically started.
  |
  | [Unit]
  | Description=Build daemon for GNU Guix
  |
  | [Service]
  | ExecStart=/usr/bin/guix-daemon --build-users-group=_guixbuild
--substitute-urls='http://192.168.1.39:8080 https://ci.guix.gnu.org
https://bordeaux.guix.gnu.org'
  | Environment=LC_ALL=C.UTF-8
  | StandardOutput=syslog
  | StandardError=syslog
  |
  | # Work around a nasty systemd ‘feature’ that kills the entire process tree
  | # (including the daemon!) if any child, such as cc1plus, runs out of memory.
  | OOMPolicy=continue
  |
  | # Despite the name, this is rate-limited: a broken daemon will
eventually fail.
  | Restart=always
  |
  | # See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>.
  | # Some package builds (for example, go@1.8.1) may require even more than
  | # 1024 tasks.
  | TasksMax=8192
  |
  | [Install]
  | WantedBy=multi-user.target
  `----

  Finally, I executed the following two commands.

  ,----
  | systemctl daemon-reload
  | systemctl restart guix-daemon.service
  `----

  When I executed `guix home', the packages were retrieved from my other
  system (see line below `substitute: updating substitutes from
  'http://192.168.1.39:8080'... 100.0%').

  ,----
  | rdrg@desktop:~$ guix home -L ~/guix-packages reconfigure
~/guix-config/home-configuration.scm
  | hint: Consider installing the `glibc-locales' package and defining
`GUIX_LOCPATH', along these lines:
  |
  |      guix install glibc-locales
  |      export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
  |
  | See the "Application Setup" section in the manual, for more info.
  |
  | guix home: warning: cannot determine provenance for current system
  | substitute: updating substitutes from 'http://192.168.1.39:8080'... 100.0%
  | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
  | substitute: updating substitutes from
'https://bordeaux.guix.gnu.org'... 100.0%
  | The following derivations will be built:
  |   /gnu/store/kdlm30fl3cv6r0ww2njm0d7w8cipjpyj-home.drv
  |   /gnu/store/76835anafmiz8ngx2aqwynps72m0wmgd-setup-environment.drv
  | (... some omitted lines ...)
  `----


[This section]
<https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html>


2 Pending question
==================

  I was able to download packages from my other system without having
  to perform the following step which is mentioned in [the
  aforementioned part of the manual].

  ,----
  | guix archive --authorize < key.pub
  `----

  I wonder whether this command is relevant in this context or not. Any
  information is appreciated.


[the aforementioned part of the manual]
<https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html>


  reply	other threads:[~2023-05-19 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 17:40 How to enable server discovery in foreign distro? Rodrigo Morales
2023-05-19 20:18 ` Rodrigo Morales [this message]
2023-05-19 20:55   ` Rodrigo Morales
2023-05-20  4:13     ` Rodrigo Morales
2023-05-20  3:51   ` Philip McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGxMbPZOa0p905SWOX2Nm9_oMxP+d2skD-HHNKhAL+OndFqbCA@mail.gmail.com \
    --to=moralesrodrigo1100@gmail.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).