all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 34929@debbugs.gnu.org
Subject: [bug#34929] [PATCH 00/12] Provide uniform keyboard layout configuration
Date: Sun, 24 Mar 2019 11:03:03 +0100	[thread overview]
Message-ID: <20190324110303.290a4a79@lepiller.eu> (raw)
In-Reply-To: <20190320223229.24417-1-ludo@gnu.org>

Le Wed, 20 Mar 2019 23:32:29 +0100,
Ludovic Courtès <ludo@gnu.org> a écrit :

> Hello Guix!
> 
> This patch series attempts to address a longstanding issue in Guix:
> keyboard layout configuration.
> 
> The end result is that you can configure the layout for GRUB,
> the Linux console, and Xorg using a single <keyboard-layout> record,
> which directly corresponds to an XKB layout specification.
> 
> The three things still have to be configured separately.  Here’s an
> example where GRUB, Linux, and Xorg use the same layout:
> 
>   (operating-system
>     ;; ...
>     (keyboard-layout (keyboard-layout "tr"))  ;for the console
>     (bootloader (bootloader-configuration
>                   (bootloader grub-efi-bootloader)
>                   (target "/boot/efi")
>                   (keyboard-layout keyboard-layout))) ;for GRUB
>     (services (modify-services %desktop-services
>                 (slim-service-type config =>
>                   (slim-configuration
>                     (inherit config)
>                     (xorg-configuration
>                       (xorg-configuration             ;for Xorg
>                         (keyboard-layout keyboard-layout))))))))
> 
> Clearly the Xorg bit is suboptimal.  I don’t see any obvious way
> to simplify this part unfortunately because the <xorg-configuration>
> record is aggregated by ‘slim-configuration’ & co. (there’s no Xorg
> service that we could extend.)  That’s something we can still improve
> afterwards, though.
> 
> Potentially controversial issues:
> 
>   1. The Xorg API is changed in an incompatible way:
>      ‘xorg-start-command’ has a different prototype, the ‘startx’
>      field of ‘slim-configuration’ is gone, etc.  If you were using
>      these, your config will have to be adjusted to use the new
>      ‘xorg-configuration’ record. (But hey, we’re still pre-1.0!).
> 
>   2. Since both fields and the record constructor are called
>      ‘keyboard-layout’, you could easily have name clashes (it’s
>      more of an aesthetic consideration, not a showstopper.)
> 
> After that we should probably change the installer to generate
> the right incantations.
> 
> These patches fix <https://issues.guix.info/issue/25453> and
> <https://issues.guix.info/issue/26234>.
> 
> Feedback welcome!
> 
> And thanks to nee for the initial inspiration!
> 
> Ludo’.
> 
> Ludovic Courtès (12):
>   bootloader: Remove unused 'additional-configuration' field.
>   bootloader: Reindent record type definition.
>   Add (gnu system keyboard).
>   bootloader: Add a 'keyboard-layout' field.
>   services: xorg: Remove unused #:guile parameter.
>   services: xorg: Define and <xorg-configuration> record type.
>   services: sddm, slim, gdm: Take an <xorg-configuration> record.
>   services: xorg: Add a 'keyboard-layout' field in
> <xorg-configuration>. vm: 'virtualized-operating-system' inherits
> from the user's bootloader config.
>   gnu: Add loadkeys-static.
>   system: Initialize console keyboard layout in the initrd.
>   doc: Document keyboard layout.
> 
>  doc/guix.texi               | 305
> ++++++++++++++++++++++++------------ gnu.scm                     |
> 3 +- gnu/bootloader.scm          |  43 ++---
>  gnu/bootloader/grub.scm     |  35 +++++
>  gnu/build/linux-boot.scm    |  15 +-
>  gnu/local.mk                |   1 +
>  gnu/packages/linux.scm      |  37 +++++
>  gnu/services/sddm.scm       |  14 +-
>  gnu/services/xorg.scm       | 182 ++++++++++++---------
>  gnu/system.scm              |   7 +-
>  gnu/system/keyboard.scm     |  98 ++++++++++++
>  gnu/system/linux-initrd.scm |  26 ++-
>  gnu/system/vm.scm           |   1 +
>  13 files changed, 561 insertions(+), 206 deletions(-)
>  create mode 100644 gnu/system/keyboard.scm
> 

Apart from the minor comments I already sent to patches 4, 6 and 8,
LGTM! Thank you!

  parent reply	other threads:[~2019-03-24 10:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 22:32 [bug#34929] [PATCH 00/12] Provide uniform keyboard layout configuration Ludovic Courtès
2019-03-20 23:04 ` [bug#34929] [PATCH 01/12] bootloader: Remove unused 'additional-configuration' field Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 02/12] bootloader: Reindent record type definition Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 03/12] Add (gnu system keyboard) Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 04/12] bootloader: Add a 'keyboard-layout' field Ludovic Courtès
2019-03-24  9:31     ` Julien Lepiller
2019-03-24 21:18       ` Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 05/12] services: xorg: Remove unused #:guile parameter Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 06/12] services: xorg: Define and <xorg-configuration> record type Ludovic Courtès
2019-03-24  9:46     ` Julien Lepiller
2019-03-24 21:18       ` Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 07/12] services: sddm, slim, gdm: Take an <xorg-configuration> record Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 08/12] services: xorg: Add a 'keyboard-layout' field in <xorg-configuration> Ludovic Courtès
2019-03-24  9:50     ` Julien Lepiller
2019-03-20 23:04   ` [bug#34929] [PATCH 09/12] vm: 'virtualized-operating-system' inherits from the user's bootloader config Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 10/12] gnu: Add loadkeys-static Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 11/12] system: Initialize console keyboard layout in the initrd Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 12/12] doc: Document keyboard layout Ludovic Courtès
2019-03-24 10:03 ` Julien Lepiller [this message]
2019-03-24 22:14   ` bug#34929: [PATCH 00/12] Provide uniform keyboard layout configuration Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190324110303.290a4a79@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=34929@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.