unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Adding a network interface
@ 2017-09-24 17:12 Konrad Hinsen
  2017-09-25 14:39 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Hinsen @ 2017-09-24 17:12 UTC (permalink / raw)
  To: guix-devel

Dear Guixers,

I have started to play with GuixSD in a virtual machine, but I quickly 
got stuck. My starting point is the supplied "bare bones" setup, which 
works fine with only trivial modifications such as the disk device name 
and the user accounts to be created.

My virtual machine has two network interfaces, one for connections to 
the outside world and one for connections to/from the host (that's how 
VirtualBox works). The first one gets configured automatically via DHCP, 
presumably via (dhcp-client-service). The second one must be configured 
statically. After some exploration, I added

   (static-networking-service "enp0s8" ...)

to the list of services. No chance:

   service "networking" provided more than once

That must be because "lo" is already configured in %base-services. But 
the documentation explicitly says that I can call 
static-networking-service multiple times for multiple interfaces!

After a look at the source code for service management, I tried

   (modify-services %base-services
      (static-networking-service-type
         interfaces => (cons (static-networking-service "enp0s8" ...)
                             interfaces)))

This yields an error message from static-networking-shepherd-service 
about concerning "no matching pattern", which suggests that I haven't 
read enough of the source code to get this right. Back to the source 
code, and another try:

   (modify-services %base-services
      (static-networking-service-type
         interfaces => (cons (static-networking (interface "enp0s8") ...)
                             interfaces)))

Now I am back to: service "networking" provided more than once. So I am 
giving up... What's the solution to this puzzle?

Konrad.

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

end of thread, other threads:[~2017-09-26  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-24 17:12 Adding a network interface Konrad Hinsen
2017-09-25 14:39 ` Ricardo Wurmus
2017-09-26  7:02   ` Konrad Hinsen

Code repositories for project(s) associated with this public inbox

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

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).