gnu: Define '%base-services'.
* gnu/services/base.scm (%base-services): New variable. * gnu/system.scm (<operating-system>)[services]: Change the default value to %BASE-SERVICES. * doc/guix.texi (Using the Configuration System): Change '%standard-services' to '%base-services'.
This commit is contained in:
parent
db4fdc04cc
commit
8b198abecd
|
@ -2562,7 +2562,7 @@ Linux-Libre kernel, initial RAM disk, and boot loader looks like this:
|
||||||
|
|
||||||
@findex operating-system
|
@findex operating-system
|
||||||
@lisp
|
@lisp
|
||||||
(use-modules (gnu services base)
|
(use-modules (gnu services base) ; for '%base-services'
|
||||||
(gnu services ssh) ; for 'lsh-service'
|
(gnu services ssh) ; for 'lsh-service'
|
||||||
(gnu system shadow) ; for 'user-account'
|
(gnu system shadow) ; for 'user-account'
|
||||||
(gnu packages base) ; Coreutils, grep, etc.
|
(gnu packages base) ; Coreutils, grep, etc.
|
||||||
|
@ -2591,7 +2591,7 @@ Linux-Libre kernel, initial RAM disk, and boot loader looks like this:
|
||||||
procps psmisc
|
procps psmisc
|
||||||
zile less))
|
zile less))
|
||||||
(services (cons (lsh-service #:port 2222 #:allow-root-login? #t)
|
(services (cons (lsh-service #:port 2222 #:allow-root-login? #t)
|
||||||
%standard-services))))
|
%base-services))))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
This example should be self-describing. The @code{packages} field lists
|
This example should be self-describing. The @code{packages} field lists
|
||||||
|
@ -2601,8 +2601,9 @@ visible on the system, for all user accounts---i.e., in every user's
|
||||||
@code{PATH} environment variable---in addition to the per-user profiles
|
@code{PATH} environment variable---in addition to the per-user profiles
|
||||||
(@pxref{Invoking guix package}).
|
(@pxref{Invoking guix package}).
|
||||||
|
|
||||||
|
@vindex %base-services
|
||||||
The @code{services} field lists @dfn{system services} to be made
|
The @code{services} field lists @dfn{system services} to be made
|
||||||
available when the system starts. The @var{%standard-services} list,
|
available when the system starts. The @var{%base-services} list,
|
||||||
from the @code{(gnu services base)} module, provides the basic services one
|
from the @code{(gnu services base)} module, provides the basic services one
|
||||||
would expect from a GNU system: a login service (mingetty) on each tty,
|
would expect from a GNU system: a login service (mingetty) on each tty,
|
||||||
syslogd, libc's name service cache daemon (nscd), etc.
|
syslogd, libc's name service cache daemon (nscd), etc.
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
mingetty-service
|
mingetty-service
|
||||||
nscd-service
|
nscd-service
|
||||||
syslog-service
|
syslog-service
|
||||||
guix-service))
|
guix-service
|
||||||
|
%base-services))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -173,4 +174,18 @@ BUILD-ACCOUNTS user accounts available under BUILD-USER-GID."
|
||||||
(members (map user-account-name
|
(members (map user-account-name
|
||||||
user-accounts)))))))))
|
user-accounts)))))))))
|
||||||
|
|
||||||
|
(define %base-services
|
||||||
|
;; Convenience variable holding the basic services.
|
||||||
|
(let ((motd (text-file "motd" "
|
||||||
|
This is the GNU operating system, welcome!\n\n")))
|
||||||
|
(list (mingetty-service "tty1" #:motd motd)
|
||||||
|
(mingetty-service "tty2" #:motd motd)
|
||||||
|
(mingetty-service "tty3" #:motd motd)
|
||||||
|
(mingetty-service "tty4" #:motd motd)
|
||||||
|
(mingetty-service "tty5" #:motd motd)
|
||||||
|
(mingetty-service "tty6" #:motd motd)
|
||||||
|
(syslog-service)
|
||||||
|
(guix-service)
|
||||||
|
(nscd-service))))
|
||||||
|
|
||||||
;;; base.scm ends here
|
;;; base.scm ends here
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services dmd)
|
#:use-module (gnu services dmd)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
#:use-module ((gnu services networking)
|
|
||||||
#:select (static-networking-service))
|
|
||||||
#:use-module (gnu system grub)
|
#:use-module (gnu system grub)
|
||||||
#:use-module (gnu system shadow)
|
#:use-module (gnu system shadow)
|
||||||
#:use-module (gnu system linux)
|
#:use-module (gnu system linux)
|
||||||
|
@ -107,23 +105,7 @@
|
||||||
(locale operating-system-locale) ; string
|
(locale operating-system-locale) ; string
|
||||||
|
|
||||||
(services operating-system-services ; list of monadic services
|
(services operating-system-services ; list of monadic services
|
||||||
(default
|
(default %base-services)))
|
||||||
(let ((motd (text-file "motd" "
|
|
||||||
This is the GNU operating system, welcome!\n\n")))
|
|
||||||
(list (mingetty-service "tty1" #:motd motd)
|
|
||||||
(mingetty-service "tty2" #:motd motd)
|
|
||||||
(mingetty-service "tty3" #:motd motd)
|
|
||||||
(mingetty-service "tty4" #:motd motd)
|
|
||||||
(mingetty-service "tty5" #:motd motd)
|
|
||||||
(mingetty-service "tty6" #:motd motd)
|
|
||||||
(syslog-service)
|
|
||||||
(guix-service)
|
|
||||||
(nscd-service)
|
|
||||||
|
|
||||||
;; QEMU networking settings.
|
|
||||||
(static-networking-service "eth0" "10.0.2.10"
|
|
||||||
#:name-servers '("10.0.2.3")
|
|
||||||
#:gateway "10.0.2.2"))))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue