mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
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>
This commit is contained in:
parent
bc7d089a9c
commit
5eca94594d
2 changed files with 20 additions and 0 deletions
|
@ -4745,6 +4745,11 @@ passed to @command{guix-daemon}.
|
||||||
Run @var{udev}, which populates the @file{/dev} directory dynamically.
|
Run @var{udev}, which populates the @file{/dev} directory dynamically.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Monadic Procedure} console-keymap-service @var{file}
|
||||||
|
Return a service to load console keymap from @var{file} using
|
||||||
|
@command{loadkeys} command.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
|
||||||
@node Networking Services
|
@node Networking Services
|
||||||
@subsubsection Networking Services
|
@subsubsection Networking Services
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -46,6 +47,7 @@ (define-module (gnu services base)
|
||||||
swap-service
|
swap-service
|
||||||
user-processes-service
|
user-processes-service
|
||||||
host-name-service
|
host-name-service
|
||||||
|
console-keymap-service
|
||||||
console-font-service
|
console-font-service
|
||||||
udev-service
|
udev-service
|
||||||
mingetty-service
|
mingetty-service
|
||||||
|
@ -313,6 +315,19 @@ (define (unicode-start tty)
|
||||||
(else
|
(else
|
||||||
(zero? (cdr (waitpid pid))))))))
|
(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"))
|
(define* (console-font-service tty #:optional (font "LatGrkCyr-8x16"))
|
||||||
"Return a service that sets up Unicode support in @var{tty} and loads
|
"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.)"
|
@var{font} for that tty (fonts are per virtual console in Linux.)"
|
||||||
|
|
Loading…
Reference in a new issue