guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: vm-image: Remove NetworkManager & co. and add the DHCP client.


From: guix-commits
Subject: 04/04: vm-image: Remove NetworkManager & co. and add the DHCP client.
Date: Fri, 26 Apr 2019 12:27:24 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d7b05620a923757e0fee0888202f69cb96c348c8
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 26 18:24:55 2019 +0200

    vm-image: Remove NetworkManager & co. and add the DHCP client.
    
    * gnu/system/examples/vm-image.tmpl (services): Remove wpa-supplicant,
    cups-pk-helper, and NetworkManager.  Add DHCP-CLIENT-SERVICE-TYPE.
---
 gnu/system/examples/vm-image.tmpl | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/system/examples/vm-image.tmpl 
b/gnu/system/examples/vm-image.tmpl
index 62ed032..b6f9daa 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -5,7 +5,7 @@
 ;;
 
 (use-modules (gnu) (srfi srfi-1))
-(use-service-modules xorg desktop)
+(use-service-modules desktop networking xorg)
 (use-package-modules bootloaders nvi wget xorg)
 
 (define vm-image-motd (plain-file "motd" "
@@ -71,11 +71,19 @@ accounts.\x1b[0m
                            (default-user "guest")
                            (xorg-configuration
                             (xorg-configuration
-                             (keyboard-layout keyboard-layout))))))
+                             (keyboard-layout keyboard-layout)))))
 
-           ;; Remove GDM.
+                 ;; Use the DHCP client service rather than NetworkManager.
+                 (service dhcp-client-service-type))
+
+           ;; Remove GDM, NetworkManager, and wpa-supplicant, which don't make
+           ;; sense in a VM.
            (remove (lambda (service)
-                     (eq? gdm-service-type (service-kind service)))
+                     (let ((type (service-kind service)))
+                       (memq type (list gdm-service-type
+                                        wpa-supplicant-service-type
+                                        cups-pk-helper-service-type
+                                        network-manager-service-type))))
                    (modify-services %desktop-services
                      (login-service-type config =>
                                          (login-configuration



reply via email to

[Prev in Thread] Current Thread [Next in Thread]