diff options
Diffstat (limited to 'gnu/services/base.scm')
| -rw-r--r-- | gnu/services/base.scm | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 945b5466072..f6a490f7121 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> | 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> |
| 4 | ;;; Copyright © 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> | 4 | ;;; Copyright © 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> | 5 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| @@ -279,7 +279,9 @@ system objects."))) | |||
| 279 | 279 | ||
| 280 | (define root-file-system-service-type | 280 | (define root-file-system-service-type |
| 281 | (shepherd-service-type 'root-file-system | 281 | (shepherd-service-type 'root-file-system |
| 282 | (const %root-file-system-shepherd-service))) | 282 | (const %root-file-system-shepherd-service) |
| 283 | (description "Take care of syncing the root file | ||
| 284 | system and of remounting it read-only when the system shuts down."))) | ||
| 283 | 285 | ||
| 284 | (define (root-file-system-service) | 286 | (define (root-file-system-service) |
| 285 | "Return a service whose sole purpose is to re-mount read-only the root file | 287 | "Return a service whose sole purpose is to re-mount read-only the root file |
| @@ -570,7 +572,9 @@ down."))) | |||
| 570 | (requirement '(udev)) | 572 | (requirement '(udev)) |
| 571 | (provision '(trng)) | 573 | (provision '(trng)) |
| 572 | (start #~(make-forkexec-constructor '#$rngd-command)) | 574 | (start #~(make-forkexec-constructor '#$rngd-command)) |
| 573 | (stop #~(make-kill-destructor)))))) | 575 | (stop #~(make-kill-destructor)))) |
| 576 | (description "Run the @command{rngd} random number generation daemon to | ||
| 577 | supply entropy to the kernel's pool."))) | ||
| 574 | 578 | ||
| 575 | (define* (rngd-service #:key | 579 | (define* (rngd-service #:key |
| 576 | (rng-tools rng-tools) | 580 | (rng-tools rng-tools) |
| @@ -597,7 +601,8 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 597 | (provision '(host-name)) | 601 | (provision '(host-name)) |
| 598 | (start #~(lambda _ | 602 | (start #~(lambda _ |
| 599 | (sethostname #$name))) | 603 | (sethostname #$name))) |
| 600 | (one-shot? #t))))) | 604 | (one-shot? #t))) |
| 605 | (description "Initialize the machine's host name."))) | ||
| 601 | 606 | ||
| 602 | (define (host-name-service name) | 607 | (define (host-name-service name) |
| 603 | "Return a service that sets the host name to @var{name}." | 608 | "Return a service that sets the host name to @var{name}." |
| @@ -626,7 +631,8 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 626 | (display 1 port)))) | 631 | (display 1 port)))) |
| 627 | #t)) | 632 | #t)) |
| 628 | (stop #~(const #f))))) | 633 | (stop #~(const #f))))) |
| 629 | #t)) ;default to UTF-8 | 634 | #t ;default to UTF-8 |
| 635 | (description "Ensure the Linux virtual terminals run in UTF-8 mode."))) | ||
| 630 | 636 | ||
| 631 | (define console-keymap-service-type | 637 | (define console-keymap-service-type |
| 632 | (shepherd-service-type | 638 | (shepherd-service-type |
| @@ -638,7 +644,10 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 638 | (start #~(lambda _ | 644 | (start #~(lambda _ |
| 639 | (zero? (system* #$(file-append kbd "/bin/loadkeys") | 645 | (zero? (system* #$(file-append kbd "/bin/loadkeys") |
| 640 | #$@files)))) | 646 | #$@files)))) |
| 641 | (respawn? #f))))) | 647 | (respawn? #f))) |
| 648 | (description "@emph{This service is deprecated in favor of the | ||
| 649 | @code{keyboard-layout} field of @code{operating-system}.} Load the given list | ||
| 650 | of console keymaps with @command{loadkeys}."))) | ||
| 642 | 651 | ||
| 643 | (define-deprecated (console-keymap-service #:rest files) | 652 | (define-deprecated (console-keymap-service #:rest files) |
| 644 | #f | 653 | #f |
| @@ -1341,7 +1350,9 @@ Service Switch}, for an example." | |||
| 1341 | (pid (spawn))) | 1350 | (pid (spawn))) |
| 1342 | (umask mask) | 1351 | (umask mask) |
| 1343 | pid)))) | 1352 | pid)))) |
| 1344 | (stop #~(make-kill-destructor)))))) | 1353 | (stop #~(make-kill-destructor)))) |
| 1354 | (description "Run the syslog daemon, @command{syslogd}, which is | ||
| 1355 | responsible for logging system messages."))) | ||
| 1345 | 1356 | ||
| 1346 | ;; Snippet adapted from the GNU inetutils manual. | 1357 | ;; Snippet adapted from the GNU inetutils manual. |
| 1347 | (define %default-syslog.conf | 1358 | (define %default-syslog.conf |
| @@ -2207,7 +2218,8 @@ instance." | |||
| 2207 | (when device | 2218 | (when device |
| 2208 | (restart-on-EINTR (swapoff device))) | 2219 | (restart-on-EINTR (swapoff device))) |
| 2209 | #f))) | 2220 | #f))) |
| 2210 | (respawn? #f)))))) | 2221 | (respawn? #f)))) |
| 2222 | (description "Turn on the virtual memory swap area."))) | ||
| 2211 | 2223 | ||
| 2212 | (define (swap-service device) | 2224 | (define (swap-service device) |
| 2213 | "Return a service that uses @var{device} as a swap device." | 2225 | "Return a service that uses @var{device} as a swap device." |
| @@ -2321,7 +2333,9 @@ This service is not part of @var{%base-services}." | |||
| 2321 | (requirement '(user-processes udev dbus-system)) | 2333 | (requirement '(user-processes udev dbus-system)) |
| 2322 | (provision (list (symbol-append 'term- (string->symbol virtual-terminal)))) | 2334 | (provision (list (symbol-append 'term- (string->symbol virtual-terminal)))) |
| 2323 | (start #~(make-forkexec-constructor #$kmscon-command)) | 2335 | (start #~(make-forkexec-constructor #$kmscon-command)) |
| 2324 | (stop #~(make-kill-destructor))))))) | 2336 | (stop #~(make-kill-destructor))))) |
| 2337 | (description "Start the @command{kmscon} virtual terminal emulator for the | ||
| 2338 | Linux @dfn{kernel mode setting} (KMS)."))) | ||
| 2325 | 2339 | ||
| 2326 | (define-record-type* <static-networking> | 2340 | (define-record-type* <static-networking> |
| 2327 | static-networking make-static-networking | 2341 | static-networking make-static-networking |
