gnu: Add tlf.
[jackhill/guix/guix.git] / gnu / services / base.scm
index f50bcfd..bad755e 100644 (file)
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -70,7 +71,6 @@
             file-system-service-type
             swap-service
             host-name-service
-            console-keymap-service
             %default-console-font
             console-font-service-type
             console-font-service
             guix-configuration-extra-options
             guix-configuration-log-file
 
-            guix-service
             guix-service-type
             guix-publish-configuration
             guix-publish-configuration?
             guix-publish-configuration-nar-path
             guix-publish-configuration-cache
             guix-publish-configuration-ttl
-            guix-publish-service
             guix-publish-service-type
 
             gpm-configuration
             gpm-configuration?
             gpm-service-type
-            gpm-service
 
             urandom-seed-service-type
-            urandom-seed-service
 
             rngd-configuration
             rngd-configuration?
@@ -542,10 +538,6 @@ file systems, as well as corresponding @file{/etc/fstab} entries.")))
 generator (RNG) with the value recorded when the system was last shut
 down.")))
 
-(define-deprecated (urandom-seed-service)
-  urandom-seed-service-type
-  (service urandom-seed-service-type))
-
 
 ;;;
 ;;; Add hardware random number generator to entropy pool.
@@ -650,11 +642,6 @@ to add @var{device} to the kernel's entropy pool.  The service will fail if
 @code{keyboard-layout} field of @code{operating-system}.}  Load the given list
 of console keymaps with @command{loadkeys}.")))
 
-(define-deprecated (console-keymap-service #:rest files)
-  #f
-  "Return a service to load console keymaps from @var{files}."
-  (service console-keymap-service-type files))
-
 (define %default-console-font
   ;; Note: 'LatGrkCyr-8x16' has the advantage of providing three common
   ;; scripts as well as glyphs for em dash, quotation marks, and other Unicode
@@ -1769,13 +1756,6 @@ proxy of 'guix-daemon'...~%")
    (description
     "Run the build daemon of GNU@tie{}Guix, aka. @command{guix-daemon}.")))
 
-(define-deprecated (guix-service #:optional
-                                 (config %default-guix-configuration))
-  guix-service-type
-  "Return a service that runs the Guix build daemon according to
-@var{config}."
-  (service guix-service-type config))
-
 
 (define-record-type* <guix-publish-configuration>
   guix-publish-configuration make-guix-publish-configuration
@@ -1815,7 +1795,11 @@ proxy of 'guix-daemon'...~%")
 raise a deprecation warning if the 'compression-level' field was used."
   (match (%guix-publish-configuration-compression-level config)
     (#f
-     '(("gzip" 3)))
+     ;; Default to low compression levels when there's no cache so that users
+     ;; get good bandwidth by default.
+     (if (guix-publish-configuration-cache config)
+         '(("gzip" 5) ("zstd" 19))
+         '(("gzip" 3) ("zstd" 3))))               ;zstd compresses faster
     (level
      (warn-about-deprecation 'compression-level properties
                              #:replacement 'compression)
@@ -1923,19 +1907,6 @@ raise a deprecation warning if the 'compression-level' field was used."
                  "Add a Shepherd service running @command{guix publish}, a
 command that allows you to share pre-built binaries with others over HTTP.")))
 
-(define-deprecated (guix-publish-service #:key (guix guix)
-                                         (port 80) (host "localhost"))
-  guix-publish-service-type
-  "Return a service that runs @command{guix publish} listening on @var{host}
-and @var{port} (@pxref{Invoking guix publish}).
-
-This assumes that @file{/etc/guix} already contains a signing key pair as
-created by @command{guix archive --generate-key} (@pxref{Invoking guix
-archive}).  If that is not the case, the service will fail to start."
-  ;; Deprecated.
-  (service guix-publish-service-type
-           (guix-publish-configuration (guix guix) (port port) (host host))))
-
 \f
 ;;;
 ;;; Udev.
@@ -2277,19 +2248,6 @@ command-line options.  GPM allows users to use the mouse in the console,
 notably to select, copy, and paste text.  The default options use the
 @code{ps2} protocol, which works for both USB and PS/2 mice.")))
 
-(define-deprecated (gpm-service #:key (gpm gpm)
-                                (options %default-gpm-options))
-  gpm-service-type
-  "Run @var{gpm}, the general-purpose mouse daemon, with the given
-command-line @var{options}.  GPM allows users to use the mouse in the console,
-notably to select, copy, and paste text.  The default value of @var{options}
-uses the @code{ps2} protocol, which works for both USB and PS/2 mice.
-
-This service is not part of @var{%base-services}."
-  ;; To test in QEMU, use "-usbdevice mouse" and then, in the monitor, use
-  ;; "info mice" and "mouse_set X" to use the right mouse.
-  (service gpm-service-type
-           (gpm-configuration (gpm gpm) (options options))))
 
 (define-record-type* <kmscon-configuration>
   kmscon-configuration     make-kmscon-configuration
@@ -2304,7 +2262,11 @@ This service is not part of @var{%base-services}."
   (auto-login              kmscon-configuration-auto-login
                            (default #f))
   (hardware-acceleration?  kmscon-configuration-hardware-acceleration?
-                           (default #f))) ; #t causes failure
+                           (default #f))  ; #t causes failure
+  (font-engine             kmscon-configuration-font-engine
+                           (default "pango"))
+  (font-size               kmscon-configuration-font-size
+                           (default 12)))
 
 (define kmscon-service-type
   (shepherd-service-type
@@ -2315,13 +2277,17 @@ This service is not part of @var{%base-services}."
            (login-program (kmscon-configuration-login-program config))
            (login-arguments (kmscon-configuration-login-arguments config))
            (auto-login (kmscon-configuration-auto-login config))
-           (hardware-acceleration? (kmscon-configuration-hardware-acceleration? config)))
+           (hardware-acceleration? (kmscon-configuration-hardware-acceleration? config))
+           (font-engine (kmscon-configuration-font-engine config))
+           (font-size (kmscon-configuration-font-size config)))
 
        (define kmscon-command
          #~(list
             #$(file-append kmscon "/bin/kmscon") "--login"
             "--vt" #$virtual-terminal
             "--no-switchvt" ;Prevent a switch to the virtual terminal.
+            "--font-engine" #$font-engine
+            "--font-size" #$(number->string font-size)
             #$@(if hardware-acceleration? '("--hwaccel") '())
             "--login" "--"
             #$login-program #$@login-arguments