summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-25 23:26:08 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-25 23:26:08 +0200
commitf83e943fe7b7a4db93a6c603b9fdde57a35e918d (patch)
treeb2a23f7519043f0bcb38e1bb1d454d7994b00343 /gnu/system/vm.scm
parent27cab84c6d598d5bb53bf136d78e7a2b0e8e0269 (diff)
downloadguix-patches-f83e943fe7b7a4db93a6c603b9fdde57a35e918d.tar
guix-patches-f83e943fe7b7a4db93a6c603b9fdde57a35e918d.tar.gz
gnu: vm: Add 'networking' service.
* gnu/system/vm.scm (system-qemu-image): Use 'static-networking-service'. Add /etc/resolv.conf. Add Inetutils to the profile. * gnu/system/dmd.scm (static-networking-service): New procedure.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index dd97e5ee0d..b873386606 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -455,7 +455,15 @@ Happy birthday, GNU! http://www.gnu.org/gnu30
(mingetty-service store "tty5")
(mingetty-service store "tty6")
(syslog-service store)
- (guix-service store #:guix guix-0.4)))
+ (guix-service store #:guix guix-0.4)
+
+ ;; QEMU networking settings.
+ (static-networking-service store "eth0" "10.0.2.10")))
+
+ (define resolv.conf
+ ;; Name resolution for default QEMU settings.
+ (add-text-to-store store "resolv.conf"
+ "nameserver 10.0.2.3\n"))
(parameterize ((%guile-for-build (package-derivation store guile-final)))
(let* ((bash-drv (package-derivation store bash))
@@ -480,6 +488,7 @@ Happy birthday, GNU! http://www.gnu.org/gnu30
("dmd" ,dmd)
("gcc" ,gcc-final)
("libc" ,glibc-final)
+ ("inetutils" ,inetutils)
("guix" ,guix-0.4)))
;; TODO: Replace with a real profile with a manifest.
@@ -514,6 +523,7 @@ You can log in as 'root' with no password.
("/etc/passwd" -> ,passwd)
("/etc/login.defs" -> "/dev/null")
("/etc/pam.d" -> ,pam.d)
+ ("/etc/resolv.conf" -> ,resolv.conf)
("/etc/profile" -> ,bashrc)
("/etc/issue" -> ,issue)
(directory "/var/nix/gcroots")
@@ -552,6 +562,7 @@ You can log in as 'root' with no password.
("etc-passwd" ,passwd)
("etc-shadow" ,shadow)
("etc-group" ,group)
+ ("etc-resolv.conf" ,resolv.conf)
("etc-bashrc" ,bashrc)
("etc-issue" ,issue)
("etc-motd" ,motd)