summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-11 22:42:59 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-11 22:42:59 -0400
commitb7cbca221f74e9e9ef43c228dca9fa9930babec5 (patch)
tree33d0c1b2ae9a09a6e50652f61cdb16c7ba5d9003 /gnu/system
parentc80627731bc100baa4b6c5d265df5465cee9498e (diff)
parentfb5d04d36334784a5ac76c4a90de1e1376120885 (diff)
downloadguix-patches-b7cbca221f74e9e9ef43c228dca9fa9930babec5.tar
guix-patches-b7cbca221f74e9e9ef43c228dca9fa9930babec5.tar.gz
Merge branch 'version-1.3.0'
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/examples/vm-image.tmpl26
-rw-r--r--gnu/system/locale.scm4
2 files changed, 27 insertions, 3 deletions
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index bcb2ba614c..697019e877 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -5,7 +5,7 @@
;;
(use-modules (gnu) (guix) (srfi srfi-1))
-(use-service-modules desktop networking ssh xorg)
+(use-service-modules desktop mcron networking spice ssh xorg)
(use-package-modules bootloaders certs fonts nvi
package-management wget xorg)
@@ -24,6 +24,18 @@ Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation.
accounts.\x1b[0m
"))
+;;; XXX: Xfce does not implement what is needed for the SPICE dynamic
+;;; resolution to work (see:
+;;; https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/142). Workaround it
+;;; by manually invoking xrandr every second.
+(define auto-update-resolution-crutch
+ #~(job '(next-second)
+ (lambda ()
+ (setenv "DISPLAY" ":0.0")
+ (setenv "XAUTHORITY" "/home/guest/.Xauthority")
+ (execl (string-append #$xrandr "/bin/xrandr") "xrandr" "-s" "0"))
+ #:user "guest"))
+
(operating-system
(host-name "gnu")
(timezone "Etc/UTC")
@@ -75,11 +87,23 @@ root ALL=(ALL) ALL
(default-user "guest")
(xorg-configuration
(xorg-configuration
+ ;; The QXL virtual GPU driver is added to provide
+ ;; a better SPICE experience.
+ (modules (cons xf86-video-qxl
+ %default-xorg-modules))
(keyboard-layout keyboard-layout)))))
;; Uncomment the line below to add an SSH server.
;;(service openssh-service-type)
+ ;; Add support for the SPICE protocol, which enables dynamic
+ ;; resizing of the guest screen resolution, clipboard
+ ;; integration with the host, etc.
+ (service spice-vdagent-service-type)
+
+ (simple-service 'cron-jobs mcron-service-type
+ (list auto-update-resolution-crutch))
+
;; Use the DHCP client service rather than NetworkManager.
(service dhcp-client-service-type))
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 689d238d1a..18bbe5ba32 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -148,7 +148,7 @@ data format changes between libc versions."
(define %default-locale-libcs
;; The libcs for which we build locales by default.
;; List the previous and current libc to ease transition.
- (list glibc-2.29 glibc))
+ (list glibc))
(define %default-locale-definitions
;; Arbitrary set of locales that are built by default. They are here mostly