1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu services base)
20 #:use-module (guix store)
21 #:use-module (gnu services)
22 #:use-module (gnu services networking)
23 #:use-module (gnu system shadow) ; 'user-account', etc.
24 #:use-module (gnu system linux) ; 'pam-service', etc.
25 #:use-module (gnu packages admin)
26 #:use-module ((gnu packages linux)
27 #:select (eudev kbd e2fsprogs lvm2 fuse alsa-utils))
28 #:use-module ((gnu packages base)
29 #:select (canonical-package glibc))
30 #:use-module (gnu packages package-management)
31 #:use-module ((gnu build file-systems)
32 #:select (mount-flags->bit-mask))
33 #:use-module (guix gexp)
34 #:use-module (guix monads)
35 #:use-module (guix records)
36 #:use-module (srfi srfi-1)
37 #:use-module (srfi srfi-26)
38 #:use-module (ice-9 match)
39 #:use-module (ice-9 format)
40 #:export (root-file-system-service
43 device-mapping-service
45 user-processes-service
52 %nscd-default-configuration
67 ;;; Base system services---i.e., services that 99% of the users will want to
72 (define (root-file-system-service)
73 "Return a service whose sole purpose is to re-mount read-only the root file
74 system upon shutdown (aka. cleanly \"umounting\" root.)
76 This service must be the root of the service dependency graph so that its
77 'stop' action is invoked when dmd is the only process left."
78 (with-monad %store-monad
81 (documentation "Take care of the root file system.")
82 (provision '(root-file-system))
85 ;; Return #f if successfully stopped.
88 (call-with-blocked-asyncs
90 (let ((null (%make-void-port "w")))
92 (display "closing log\n")
93 ;; XXX: Ideally we'd use 'stop-logging', but that one
94 ;; doesn't actually close the port as of dmd 0.1.
95 (close-port (@@ (dmd comm) log-output-port))
96 (set! (@@ (dmd comm) log-output-port) null)
98 ;; Redirect the default output ports..
99 (set-current-output-port null)
100 (set-current-error-port null)
102 ;; Close /dev/console.
103 (for-each close-fdes '(0 1 2))
105 ;; At this point, there are no open files left, so the
106 ;; root file system can be re-mounted read-only.
108 (logior MS_REMOUNT MS_RDONLY)
114 (define* (file-system-service device target type
115 #:key (flags '()) (check? #t)
116 create-mount-point? options (title 'any)
118 "Return a service that mounts DEVICE on TARGET as a file system TYPE with
119 OPTIONS. TITLE is a symbol specifying what kind of name DEVICE is: 'label for
120 a partition label, 'device for a device file name, or 'any. When CHECK? is
121 true, check the file system before mounting it. When CREATE-MOUNT-POINT? is
122 true, create TARGET if it does not exist yet. FLAGS is a list of symbols,
123 such as 'read-only' etc. Optionally, REQUIREMENTS may be a list of service
124 names such as device-mapping services."
125 (with-monad %store-monad
128 (provision (list (symbol-append 'file-system- (string->symbol target))))
129 (requirement `(root-file-system ,@requirements))
130 (documentation "Check, mount, and unmount the given file system.")
131 (start #~(lambda args
132 (let ((device (canonicalize-device-spec #$device '#$title)))
133 #$(if create-mount-point?
138 ;; Make sure fsck.ext2 & co. can be found.
142 "/run/current-system/profile/sbin:"
144 (check-file-system device #$type))
146 (mount device #$target #$type
147 #$(mount-flags->bit-mask flags)
151 ;; Normally there are no processes left at this point, so
152 ;; TARGET can be safely unmounted.
154 ;; Make sure PID 1 doesn't keep TARGET busy.
160 (define (user-unmount-service known-mount-points)
161 "Return a service whose sole purpose is to unmount file systems not listed
162 in KNOWN-MOUNT-POINTS when it is stopped."
163 (with-monad %store-monad
166 (documentation "Unmount manually-mounted file systems.")
167 (provision '(user-unmount))
170 (define (known? mount-point)
172 (cons* "/proc" "/sys"
173 '#$known-mount-points)))
175 ;; Make sure we don't keep the user's mount points busy.
178 (for-each (lambda (mount-point)
179 (format #t "unmounting '~a'...~%" mount-point)
182 (umount mount-point))
184 (let ((errno (system-error-errno args)))
185 (format #t "failed to unmount '~a': ~a~%"
186 mount-point (strerror errno))))))
187 (filter (negate known?) (mount-points)))
190 (define %do-not-kill-file
191 ;; Name of the file listing PIDs of processes that must survive when halting
192 ;; the system. Typical example is user-space file systems.
193 "/etc/dmd/do-not-kill")
195 (define* (user-processes-service requirements #:key (grace-delay 4))
196 "Return the service that is responsible for terminating all the processes so
197 that the root file system can be re-mounted read-only, just before
198 rebooting/halting. Processes still running GRACE-DELAY seconds after SIGTERM
199 has been sent are terminated with SIGKILL.
201 The returned service will depend on 'root-file-system' and on all the services
202 listed in REQUIREMENTS.
204 All the services that spawn processes must depend on this one so that they are
205 stopped before 'kill' is called."
206 (with-monad %store-monad
208 (documentation "When stopped, terminate all user processes.")
209 (provision '(user-processes))
210 (requirement (cons 'root-file-system requirements))
213 (define (kill-except omit signal)
214 ;; Kill all the processes with SIGNAL except those
215 ;; listed in OMIT and the current process.
216 (let ((omit (cons (getpid) omit)))
217 (for-each (lambda (pid)
218 (unless (memv pid omit)
224 ;; List of PIDs that must not be killed.
225 (if (file-exists? #$%do-not-kill-file)
227 (call-with-input-file #$%do-not-kill-file
228 (compose string-tokenize
229 (@ (ice-9 rdelim) read-string))))
233 (car (gettimeofday)))
236 ;; Really sleep N seconds.
237 ;; Work around <http://bugs.gnu.org/19581>.
239 (let loop ((elapsed 0))
241 (sleep (- n elapsed))
242 (loop (- (now) start)))))
244 (define lset= (@ (srfi srfi-1) lset=))
246 (display "sending all processes the TERM signal\n")
248 (if (null? omitted-pids)
250 ;; Easy: terminate all of them.
252 (sleep* #$grace-delay)
255 ;; Kill them all except OMITTED-PIDS. XXX: We
256 ;; would like to (kill -1 SIGSTOP) to get a fixed
257 ;; list of processes, like 'killall5' does, but
258 ;; that seems unreliable.
259 (kill-except omitted-pids SIGTERM)
260 (sleep* #$grace-delay)
261 (kill-except omitted-pids SIGKILL)
262 (delete-file #$%do-not-kill-file)))
265 (let ((pids (processes)))
266 (unless (lset= = pids (cons 1 omitted-pids))
267 (format #t "waiting for process termination\
268 (processes left: ~s)~%"
273 (display "all processes have been terminated\n")
277 (define (host-name-service name)
278 "Return a service that sets the host name to @var{name}."
279 (with-monad %store-monad
281 (documentation "Initialize the machine's host name.")
282 (provision '(host-name))
284 (sethostname #$name)))
287 (define (unicode-start tty)
288 "Return a gexp to start Unicode support on @var{tty}."
290 ;; We have to run 'unicode_start' in a pipe so that when it invokes the
291 ;; 'tty' command, that command returns TTY.
293 (let ((pid (primitive-fork)))
297 (dup2 (open-fdes #$tty O_RDONLY) 0)
299 (dup2 (open-fdes #$tty O_WRONLY) 1)
300 (execl (string-append #$kbd "/bin/unicode_start")
303 (zero? (cdr (waitpid pid))))))))
305 (define* (console-font-service tty #:optional (font "LatGrkCyr-8x16"))
306 "Return a service that sets up Unicode support in @var{tty} and loads
307 @var{font} for that tty (fonts are per virtual console in Linux.)"
308 ;; Note: 'LatGrkCyr-8x16' has the advantage of providing three common
309 ;; scripts as well as glyphs for em dash, quotation marks, and other Unicode
310 ;; codepoints notably found in the UTF-8 manual.
311 (let ((device (string-append "/dev/" tty)))
312 (with-monad %store-monad
314 (documentation "Load a Unicode console font.")
315 (provision (list (symbol-append 'console-font-
316 (string->symbol tty))))
318 ;; Start after mingetty has been started on TTY, otherwise the
319 ;; settings are ignored.
320 (requirement (list (symbol-append 'term-
321 (string->symbol tty))))
324 (and #$(unicode-start device)
326 (system* (string-append #$kbd "/bin/setfont")
327 "-C" #$device #$font)))))
331 (define* (mingetty-service tty
333 (motd (text-file "motd" "Welcome.\n"))
338 ;; Allow empty passwords by default so that
339 ;; first-time users can log in when the 'root'
340 ;; account has just been created.
341 (allow-empty-passwords? #t))
342 "Return a service to run mingetty on @var{tty}.
344 When @var{allow-empty-passwords?} is true, allow empty log-in password. When
345 @var{auto-login} is true, it must be a user name under which to log-in
346 automatically. @var{login-pause?} can be set to @code{#t} in conjunction with
347 @var{auto-login}, in which case the user will have to press a key before the
348 login shell is launched.
350 When true, @var{login-program} is a gexp or a monadic gexp denoting the name
351 of the log-in program (the default is the @code{login} program from the Shadow
354 @var{motd} is a monadic value containing a text file to use as
355 the ``message of the day''."
356 (mlet %store-monad ((motd motd)
357 (login-program (cond ((gexp? login-program)
358 (return login-program))
365 (documentation (string-append "Run mingetty on " tty "."))
366 (provision (list (symbol-append 'term- (string->symbol tty))))
368 ;; Since the login prompt shows the host name, wait for the 'host-name'
369 ;; service to be done. Also wait for udev essentially so that the tty
370 ;; text is not lost in the middle of kernel messages (XXX).
371 (requirement '(user-processes host-name udev))
373 (start #~(make-forkexec-constructor
374 (list (string-append #$mingetty "/sbin/mingetty")
377 #~("--autologin" #$auto-login)
380 #~("--loginprog" #$login-program)
385 (stop #~(make-kill-destructor))
388 ;; Let 'login' be known to PAM. All the mingetty services will have
389 ;; that PAM service, but that's fine because they're all identical and
390 ;; duplicates are removed.
391 (list (unix-pam-service "login"
392 #:allow-empty-passwords? allow-empty-passwords?
395 (define-record-type* <nscd-configuration> nscd-configuration
396 make-nscd-configuration
398 (log-file nscd-configuration-log-file ;string
399 (default "/var/log/nscd.log"))
400 (debug-level nscd-debug-level ;integer
402 ;; TODO: See nscd.conf in glibc for other options to add.
403 (caches nscd-configuration-caches ;list of <nscd-cache>
404 (default %nscd-default-caches)))
406 (define-record-type* <nscd-cache> nscd-cache make-nscd-cache
408 (database nscd-cache-database) ;symbol
409 (positive-time-to-live nscd-cache-positive-time-to-live) ;integer
410 (negative-time-to-live nscd-cache-negative-time-to-live
411 (default 20)) ;integer
412 (suggested-size nscd-cache-suggested-size ;integer ("default module
415 (check-files? nscd-cache-check-files? ;Boolean
417 (persistent? nscd-cache-persistent? ;Boolean
419 (shared? nscd-cache-shared? ;Boolean
421 (max-database-size nscd-cache-max-database-size ;integer
422 (default (* 32 (expt 2 20))))
423 (auto-propagate? nscd-cache-auto-propagate? ;Boolean
426 (define %nscd-default-caches
427 ;; Caches that we want to enable by default. Note that when providing an
428 ;; empty nscd.conf, all caches are disabled.
429 (list (nscd-cache (database 'hosts)
431 ;; Aggressively cache the host name cache to improve
432 ;; privacy and resilience.
433 (positive-time-to-live (* 3600 12))
434 (negative-time-to-live 20)
437 (nscd-cache (database 'services)
439 ;; Services are unlikely to change, so we can be even more
441 (positive-time-to-live (* 3600 24))
442 (negative-time-to-live 3600)
443 (check-files? #t) ;check /etc/services changes
446 (define %nscd-default-configuration
447 ;; Default nscd configuration.
448 (nscd-configuration))
450 (define (nscd.conf-file config)
451 "Return the @file{nscd.conf} configuration file for @var{config}, an
452 @code{<nscd-configuration>} object."
453 (define cache->config
455 (($ <nscd-cache> (= symbol->string database)
456 positive-ttl negative-ttl size check-files?
457 persistent? shared? max-size propagate?)
458 (string-append "\nenable-cache\t" database "\tyes\n"
460 "positive-time-to-live\t" database "\t"
461 (number->string positive-ttl) "\n"
462 "negative-time-to-live\t" database "\t"
463 (number->string negative-ttl) "\n"
464 "suggested-size\t" database "\t"
465 (number->string size) "\n"
466 "check-files\t" database "\t"
467 (if check-files? "yes\n" "no\n")
468 "persistent\t" database "\t"
469 (if persistent? "yes\n" "no\n")
470 "shared\t" database "\t"
471 (if shared? "yes\n" "no\n")
472 "max-db-size\t" database "\t"
473 (number->string max-size) "\n"
474 "auto-propagate\t" database "\t"
475 (if propagate? "yes\n" "no\n")))))
478 (($ <nscd-configuration> log-file debug-level caches)
479 (text-file "nscd.conf"
481 # Configuration of libc's name service cache daemon (nscd).\n\n"
483 (string-append "logfile\t" log-file)
487 (string-append "debug-level\t"
488 (number->string debug-level))
492 (map cache->config caches)))))))
494 (define* (nscd-service #:optional (config %nscd-default-configuration)
495 #:key (glibc (canonical-package glibc))
497 "Return a service that runs libc's name service cache daemon (nscd) with the
498 given @var{config}---an @code{<nscd-configuration>} object. Optionally,
499 @code{#:name-services} is a list of packages that provide name service switch
500 (NSS) modules needed by nscd."
501 (mlet %store-monad ((nscd.conf (nscd.conf-file config)))
503 (documentation "Run libc's name service cache daemon (nscd).")
505 (requirement '(user-processes))
508 (use-modules (guix build utils))
509 (mkdir-p "/var/run/nscd")
510 (mkdir-p "/var/db/nscd"))) ;for the persistent cache
512 (start #~(make-forkexec-constructor
513 (list (string-append #$glibc "/sbin/nscd")
514 "-f" #$nscd.conf "--foreground")
516 #:environment-variables
517 (list (string-append "LD_LIBRARY_PATH="
520 (string-append dir "/lib"))
521 (list #$@name-services))
523 (stop #~(make-kill-destructor))
527 (define (syslog-service)
528 "Return a service that runs @code{syslogd} with reasonable default settings."
530 ;; Snippet adapted from the GNU inetutils manual.
532 # Log all error messages, authentication messages of
533 # level notice or higher and anything of level err or
534 # higher to the console.
535 # Don't log private authentication messages!
536 *.alert;auth.notice;authpriv.none /dev/console
538 # Log anything (except mail) of level info or higher.
539 # Don't log private authentication messages!
540 *.info;mail.none;authpriv.none /var/log/messages
542 # Same, in a different place.
543 *.info;mail.none;authpriv.none /dev/tty12
545 # The authpriv file has restricted access.
546 authpriv.* /var/log/secure
548 # Log all the mail messages in one place.
549 mail.* /var/log/maillog
553 ((syslog.conf (text-file "syslog.conf" contents)))
556 (documentation "Run the syslog daemon (syslogd).")
557 (provision '(syslogd))
558 (requirement '(user-processes))
560 #~(make-forkexec-constructor
561 (list (string-append #$inetutils "/libexec/syslogd")
562 "--no-detach" "--rcfile" #$syslog.conf)))
563 (stop #~(make-kill-destructor))))))
565 (define* (guix-build-accounts count #:key
569 "Return a list of COUNT user accounts for Guix build users, with UIDs
570 starting at FIRST-UID, and under GID."
571 (with-monad %store-monad
572 (return (unfold (cut > <> count)
575 (name (format #f "guixbuilder~2,'0d" n))
577 (uid (+ first-uid n -1))
580 ;; guix-daemon expects GROUP to be listed as a
581 ;; supplementary group too:
582 ;; <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00239.html>.
583 (supplementary-groups (list group "kvm"))
585 (comment (format #f "Guix Build User ~2d" n))
586 (home-directory "/var/empty")
587 (shell #~(string-append #$shadow "/sbin/nologin"))))
591 (define (hydra-key-authorization guix)
592 "Return a gexp with code to register the hydra.gnu.org public key with
594 #~(unless (file-exists? "/etc/guix/acl")
595 (let ((pid (primitive-fork)))
598 (let* ((key (string-append #$guix
599 "/share/guix/hydra.gnu.org.pub"))
600 (port (open-file key "r0b")))
601 (format #t "registering public key '~a'...~%" key)
602 (close-port (current-input-port))
604 (execl (string-append #$guix "/bin/guix")
605 "guix" "archive" "--authorize")
608 (let ((status (cdr (waitpid pid))))
609 (unless (zero? status)
610 (format (current-error-port) "warning: \
611 failed to register hydra.gnu.org public key: ~a~%" status))))))))
613 (define* (guix-service #:key (guix guix) (builder-group "guixbuild")
614 (build-accounts 10) (authorize-hydra-key? #t)
615 (use-substitutes? #t)
617 "Return a service that runs the build daemon from @var{guix}, and has
618 @var{build-accounts} user accounts available under @var{builder-group}.
620 When @var{authorize-hydra-key?} is true, the @code{hydra.gnu.org} public key
621 provided by @var{guix} is authorized upon activation, meaning that substitutes
622 from @code{hydra.gnu.org} are used by default.
624 If @var{use-substitutes?} is false, the daemon is run with
625 @option{--no-substitutes} (@pxref{Invoking guix-daemon,
626 @option{--no-substitutes}}).
628 Finally, @var{extra-options} is a list of additional command-line options
629 passed to @command{guix-daemon}."
631 ;; Assume that the store has BUILDER-GROUP as its group. We could
632 ;; otherwise call 'chown' here, but the problem is that on a COW unionfs,
633 ;; chown leads to an entire copy of the tree, which is a bad idea.
635 ;; Optionally authorize hydra.gnu.org's key.
636 (and authorize-hydra-key?
637 (hydra-key-authorization guix)))
639 (mlet %store-monad ((accounts (guix-build-accounts build-accounts
640 #:group builder-group)))
642 (provision '(guix-daemon))
643 (requirement '(user-processes))
645 #~(make-forkexec-constructor
646 (list (string-append #$guix "/bin/guix-daemon")
647 "--build-users-group" #$builder-group
648 #$@(if use-substitutes?
650 '("--no-substitutes"))
652 (stop #~(make-kill-destructor))
653 (user-accounts accounts)
654 (user-groups (list (user-group
658 ;; Use a fixed GID so that we can create the
659 ;; store with the right owner.
661 (activate activate)))))
663 (define (udev-rules-union packages)
664 "Return the union of the @code{lib/udev/rules.d} directories found in each
665 item of @var{packages}."
668 (use-modules (guix build union)
673 (define %standard-locations
674 '("/lib/udev/rules.d" "/libexec/udev/rules.d"))
676 (define (rules-sub-directory directory)
677 ;; Return the sub-directory of DIRECTORY containing udev rules, or
678 ;; #f if none was found.
679 (find directory-exists?
680 (map (cut string-append directory <>) %standard-locations)))
682 (mkdir-p (string-append #$output "/lib/udev"))
683 (union-build (string-append #$output "/lib/udev/rules.d")
684 (filter-map rules-sub-directory '#$packages))))
686 (gexp->derivation "udev-rules" build
687 #:modules '((guix build union)
691 (define* (kvm-udev-rule)
692 "Return a directory with a udev rule that changes the group of
693 @file{/dev/kvm} to \"kvm\" and makes it #o660."
694 ;; Apparently QEMU-KVM used to ship this rule, but now we have to add it by
696 (gexp->derivation "kvm-udev-rules"
698 (use-modules (guix build utils))
701 (string-append #$output "/lib/udev/rules.d"))
704 (call-with-output-file
705 (string-append rules.d "/90-kvm.rules")
707 ;; FIXME: As a workaround for
708 ;; <http://bugs.gnu.org/18994>, make /dev/kvm 666
711 KERNEL==\"kvm\", GROUP=\"kvm\", MODE=\"0666\"\n" port))))
712 #:modules '((guix build utils))))
714 (define* (udev-service #:key (udev eudev) (rules '()))
715 "Run @var{udev}, which populates the @file{/dev} directory dynamically. Get
716 extra rules from the packages listed in @var{rules}."
717 (mlet* %store-monad ((kvm (kvm-udev-rule))
718 (rules (udev-rules-union (cons* udev kvm rules)))
719 (udev.conf (text-file* "udev.conf"
720 "udev_rules=\"" rules
721 "/lib/udev/rules.d\"\n")))
725 ;; Udev needs /dev to be a 'devtmpfs' mount so that new device
726 ;; nodes can be added: see
727 ;; <http://www.linuxfromscratch.org/lfs/view/development/chapter07/udev.html>.
728 (requirement '(root-file-system))
730 (documentation "Populate the /dev directory, dynamically.")
733 (@ (srfi srfi-1) find))
736 ;; Choose the right 'udevd'.
738 (map (lambda (suffix)
739 (string-append #$udev suffix))
740 '("/libexec/udev/udevd" ;udev
741 "/sbin/udevd")))) ;eudev
743 (define (wait-for-udevd)
744 ;; Wait until someone's listening on udevd's control
746 (let ((sock (socket AF_UNIX SOCK_SEQPACKET 0)))
750 (connect sock PF_UNIX "/run/udev/control")
753 (format #t "waiting for udevd...~%")
757 ;; Allow udev to find the modules.
758 (setenv "LINUX_MODULE_DIRECTORY"
759 "/run/booted-system/kernel/lib/modules")
761 ;; The first one is for udev, the second one for eudev.
762 (setenv "UDEV_CONFIG_FILE" #$udev.conf)
763 (setenv "EUDEV_RULES_DIRECTORY"
764 (string-append #$rules "/lib/udev/rules.d"))
766 (let ((pid (primitive-fork)))
769 (exec-command (list udevd)))
771 ;; Wait until udevd is up and running. This
772 ;; appears to be needed so that the events
773 ;; triggered below are actually handled.
776 ;; Trigger device node creation.
777 (system* (string-append #$udev "/bin/udevadm")
778 "trigger" "--action=add")
780 ;; Wait for things to settle down.
781 (system* (string-append #$udev "/bin/udevadm")
784 (stop #~(make-kill-destructor))
786 ;; When halting the system, 'udev' is actually killed by
787 ;; 'user-processes', i.e., before its own 'stop' method was
788 ;; called. Thus, make sure it is not respawned.
791 (define (device-mapping-service target open close)
792 "Return a service that maps device @var{target}, a string such as
793 @code{\"home\"} (meaning @code{/dev/mapper/home}). Evaluate @var{open}, a
794 gexp, to open it, and evaluate @var{close} to close it."
795 (with-monad %store-monad
797 (provision (list (symbol-append 'device-mapping-
798 (string->symbol target))))
799 (requirement '(udev))
800 (documentation "Map a device node using Linux's device mapper.")
801 (start #~(lambda () #$open))
802 (stop #~(lambda _ (not #$close)))
805 (define (swap-service device)
806 "Return a service that uses @var{device} as a swap device."
808 (if (string-prefix? "/dev/mapper/" device)
809 (list (symbol-append 'device-mapping-
810 (string->symbol (basename device))))
813 (with-monad %store-monad
815 (provision (list (symbol-append 'swap- (string->symbol device))))
816 (requirement `(udev ,@requirement))
817 (documentation "Enable the given swap device.")
826 (define %base-services
827 ;; Convenience variable holding the basic services.
828 (let ((motd (text-file "motd" "
829 This is the GNU operating system, welcome!\n\n")))
830 (list (console-font-service "tty1")
831 (console-font-service "tty2")
832 (console-font-service "tty3")
833 (console-font-service "tty4")
834 (console-font-service "tty5")
835 (console-font-service "tty6")
837 (mingetty-service "tty1" #:motd motd)
838 (mingetty-service "tty2" #:motd motd)
839 (mingetty-service "tty3" #:motd motd)
840 (mingetty-service "tty4" #:motd motd)
841 (mingetty-service "tty5" #:motd motd)
842 (mingetty-service "tty6" #:motd motd)
843 (static-networking-service "lo" "127.0.0.1"
844 #:provision '(loopback))
849 ;; The LVM2 rules are needed as soon as LVM2 or the device-mapper is
850 ;; used, so enable them by default. The FUSE and ALSA rules are
851 ;; less critical, but handy.
852 (udev-service #:rules (list lvm2 fuse alsa-utils)))))
854 ;;; base.scm ends here