aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-04-25 22:52:29 +0300
committerAlex Kost <alezost@gmail.com>2015-05-01 21:00:39 +0300
commit5eca94594d5f0d834d4ca918b894400e3a7f6aa1 (patch)
treee4416612203405ef71f5fe96431151272b8651c8 /gnu/services
parentbc7d089a9cb5ce843730f863cc03195168a956b9 (diff)
downloadpatches-5eca94594d5f0d834d4ca918b894400e3a7f6aa1.tar
patches-5eca94594d5f0d834d4ca918b894400e3a7f6aa1.tar.gz
services: Add console-keymap service.
* gnu/services/base.scm (console-keymap-service): New procedure. * doc/guix.texi (Base Services): Document it. Co-authored-by: 宋文武 <iyzsong@gmail.com>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index d0a2e8c848..697b9395c2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -46,6 +47,7 @@
swap-service
user-processes-service
host-name-service
+ console-keymap-service
console-font-service
udev-service
mingetty-service
@@ -313,6 +315,19 @@ stopped before 'kill' is called."
(else
(zero? (cdr (waitpid pid))))))))
+(define (console-keymap-service file)
+ "Return a service to load console keymap from @var{file}."
+ (with-monad %store-monad
+ (return
+ (service
+ (documentation
+ (string-append "Load console keymap (loadkeys)."))
+ (provision '(console-keymap))
+ (start #~(lambda _
+ (zero? (system* (string-append #$kbd "/bin/loadkeys")
+ #$file))))
+ (respawn? #f)))))
+
(define* (console-font-service tty #:optional (font "LatGrkCyr-8x16"))
"Return a service that sets up Unicode support in @var{tty} and loads
@var{font} for that tty (fonts are per virtual console in Linux.)"