all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergiu Ivanov <sivanov@colimite.fr>
To: Bruno Victal <mirai@makinata.eu>, Remco van 't Veer <remco@remworks.net>
Cc: help-guix@gnu.org
Subject: Re: Examples of local-host-entries or hosts-service-type?
Date: Sun, 26 Feb 2023 19:05:37 +0100	[thread overview]
Message-ID: <87h6v8p9b8.fsf@colimite.fr> (raw)
In-Reply-To: <06820a20-4a77-1707-a289-b83afdf7b026@makinata.eu>

Hi Bruno and Remco,

Thank you for your messages and sorry for the delay with the answer.


Bruno Victal <mirai@makinata.eu> [2023-02-21T17:45:09+0100]:
> Hi Remco,
>
> On 2023-02-11 11:46, Remco van 't Veer wrote:
>>        (hosts-service-type config =>
>>                            (cons* (host "some.ip.address.1" "machine1")
>>                                   (host "some.other.ip.address" "machine2")
>>                                   (local-host-entries host-name)))))
>
> This is not the "right" way to do use the service, the proper way is to extend this service
> (as described in the manual) by:
>
> (simple-service 'add-extra-hosts
>                 hosts-service-type
>                 (list (host "192.0.2.1" "example.com"
>                             '("example.net" "example.org"))
>                       (host "2001:db8::1" "example.com"
>                             '("example.net" "example.org"))))

Thanks a lot!  I added this to my services in operating-system and it
worked flawlessly.

> You only override the hosts-service-type value when you don't want to have
> 'localhost' as an alias of your _hostname_ or you don't want to set '127.0.0.1' / '::1'
> as IPs for localhost / _hostname_.

Oh, good to know that!

>> local-host-entries
>
> This procedure is for internal guix use, it isn't really meant to be used outside.
> In fact, I think it shouldn't be exported at all since it's only use is to set the default value of
> hosts-service-type.

I have just done a guix pull and the new version of Guix does not
recognize local-host-entries any more. Apparently someone has removed
the export, as you suggested.

In terms of the docs, I don't find the entry for hosts-service-type here
any more:

https://guix.gnu.org/manual/en/manual/devel/en/html_node/Service-Reference.html

even though this is where I found the information about
hosts-service-type last week, and a cached version of the page still
shows this entry.

I guess Guix People are working on the subject at the moment, so I will
contain my zeal to update the documentation a little bit :D

-
Sergiu


  reply	other threads:[~2023-02-26 18:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 22:40 Examples of local-host-entries or hosts-service-type? Sergiu Ivanov
2023-02-10 23:37 ` Bruno Victal
2023-02-11 11:46 ` Remco van 't Veer
2023-02-13 10:49   ` Sergiu Ivanov
2023-02-14  9:34     ` Remco van 't Veer
2023-02-21 15:33   ` Gary Johnson
2023-02-26 18:33     ` Sergiu Ivanov
2023-02-21 16:45   ` Bruno Victal
2023-02-26 18:05     ` Sergiu Ivanov [this message]
2023-02-27  6:23     ` Remco van 't Veer
2023-03-02  2:41       ` Bruno Victal
2023-03-02  8:47         ` Remco van 't Veer
2023-03-03 14:00           ` Bruno Victal
2023-03-03 16:16             ` Remco van 't Veer

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

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

  git send-email \
    --in-reply-to=87h6v8p9b8.fsf@colimite.fr \
    --to=sivanov@colimite.fr \
    --cc=help-guix@gnu.org \
    --cc=mirai@makinata.eu \
    --cc=remco@remworks.net \
    /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.
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.