diff options
| -rw-r--r-- | gnu/services/xorg.scm | 6 | ||||
| -rw-r--r-- | tests/services/xorg.scm | 35 |
2 files changed, 40 insertions, 1 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 313023f38a0..068ad68df5d 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm | |||
| @@ -685,7 +685,11 @@ a `service-extension', as used by `set-xorg-configuration'." | |||
| 685 | (configuration-record | 685 | (configuration-record |
| 686 | (inherit config) | 686 | (inherit config) |
| 687 | (xorg-configuration | 687 | (xorg-configuration |
| 688 | (merge-xorg-configurations xorg-configurations))))))))) | 688 | (merge-xorg-configurations |
| 689 | (cons ((record-accessor (record-type-descriptor config) | ||
| 690 | 'xorg-configuration) | ||
| 691 | config) | ||
| 692 | xorg-configurations)))))))))) | ||
| 689 | 693 | ||
| 690 | (define (xorg-server-profile-service config) | 694 | (define (xorg-server-profile-service config) |
| 691 | ;; XXX: profile-service-type only accepts <package> objects. | 695 | ;; XXX: profile-service-type only accepts <package> objects. |
diff --git a/tests/services/xorg.scm b/tests/services/xorg.scm index 0bb4a3e14cf..d778d0c269b 100644 --- a/tests/services/xorg.scm +++ b/tests/services/xorg.scm | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | #:use-module (gnu bootloader grub) | 24 | #:use-module (gnu bootloader grub) |
| 25 | #:use-module (gnu services) | 25 | #:use-module (gnu services) |
| 26 | #:use-module (gnu services base) | 26 | #:use-module (gnu services base) |
| 27 | #:use-module (gnu services desktop) | ||
| 28 | #:use-module (gnu services lightdm) | ||
| 27 | #:use-module (gnu services xorg) | 29 | #:use-module (gnu services xorg) |
| 28 | #:use-module (gnu system) | 30 | #:use-module (gnu system) |
| 29 | #:use-module (gnu system keyboard) | 31 | #:use-module (gnu system keyboard) |
| @@ -229,4 +231,37 @@ | |||
| 229 | (xorg-configuration (drivers %drivers-custom-1)) | 231 | (xorg-configuration (drivers %drivers-custom-1)) |
| 230 | (xorg-configuration (drivers %drivers-custom-2)))))) | 232 | (xorg-configuration (drivers %drivers-custom-2)))))) |
| 231 | 233 | ||
| 234 | ;; regression tests. | ||
| 235 | |||
| 236 | ;; https://codeberg.org/guix/guix/issues/5267 | ||
| 237 | (test-equal "https://codeberg.org/guix/guix/issues/5267" | ||
| 238 | (xorg-configuration-keyboard-layout %config-xorg-keyboard-layout-1) | ||
| 239 | (let ((os (operating-system | ||
| 240 | (host-name "test") | ||
| 241 | (bootloader | ||
| 242 | (bootloader-configuration | ||
| 243 | (bootloader grub-bootloader) | ||
| 244 | (targets '("/dev/sdX")))) | ||
| 245 | (file-systems | ||
| 246 | (cons | ||
| 247 | (file-system | ||
| 248 | (device (file-system-label "my-root")) | ||
| 249 | (mount-point "/") | ||
| 250 | (type "ext4")) | ||
| 251 | %base-file-systems)) | ||
| 252 | (services | ||
| 253 | (cons* | ||
| 254 | (service lightdm-service-type | ||
| 255 | (lightdm-configuration | ||
| 256 | (xorg-configuration | ||
| 257 | %config-xorg-keyboard-layout-1))) | ||
| 258 | (modify-services %desktop-services | ||
| 259 | (delete gdm-service-type))))))) | ||
| 260 | (xorg-configuration-keyboard-layout | ||
| 261 | (lightdm-configuration-xorg-configuration | ||
| 262 | (service-value | ||
| 263 | (fold-services | ||
| 264 | (operating-system-services os) | ||
| 265 | #:target-type lightdm-service-type)))))) | ||
| 266 | |||
| 232 | (test-end "merge-xorg-configurations") | 267 | (test-end "merge-xorg-configurations") |
