[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Adding a network interface
From: |
Konrad Hinsen |
Subject: |
Adding a network interface |
Date: |
Sun, 24 Sep 2017 19:12:03 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
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.
- Adding a network interface,
Konrad Hinsen <=