From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:49266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7zz2-0004hK-C8 for guix-patches@gnu.org; Sun, 24 Mar 2019 06:04:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7zz0-0004BB-Sc for guix-patches@gnu.org; Sun, 24 Mar 2019 06:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7zz0-0004Ay-Nq for guix-patches@gnu.org; Sun, 24 Mar 2019 06:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h7zz0-0000O3-IU for guix-patches@gnu.org; Sun, 24 Mar 2019 06:04:02 -0400 Subject: [bug#34929] [PATCH 00/12] Provide uniform keyboard layout configuration Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:49099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7zyD-0004gQ-81 for guix-patches@gnu.org; Sun, 24 Mar 2019 06:03:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7zyB-0003ta-Pp for guix-patches@gnu.org; Sun, 24 Mar 2019 06:03:13 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:42774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h7zyB-0003t9-En for guix-patches@gnu.org; Sun, 24 Mar 2019 06:03:11 -0400 Received: from localhost (89-92-10-229.hfc.dyn.abo.bbox.fr [89.92.10.229]) by lepiller.eu (OpenSMTPD) with ESMTPSA id 232821ee (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sun, 24 Mar 2019 10:03:09 +0000 (UTC) Date: Sun, 24 Mar 2019 11:03:03 +0100 From: Julien Lepiller Message-ID: <20190324110303.290a4a79@lepiller.eu> In-Reply-To: <20190320223229.24417-1-ludo@gnu.org> References: <20190320223229.24417-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34929@debbugs.gnu.org Le Wed, 20 Mar 2019 23:32:29 +0100, Ludovic Court=C3=A8s a =C3=A9crit : > Hello Guix! >=20 > This patch series attempts to address a longstanding issue in Guix: > keyboard layout configuration. >=20 > The end result is that you can configure the layout for GRUB, > the Linux console, and Xorg using a single record, > which directly corresponds to an XKB layout specification. >=20 > The three things still have to be configured separately. Here=E2=80=99s = an > example where GRUB, Linux, and Xorg use the same layout: >=20 > (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 =3D> > (slim-configuration > (inherit config) > (xorg-configuration > (xorg-configuration ;for Xorg > (keyboard-layout keyboard-layout)))))))) >=20 > Clearly the Xorg bit is suboptimal. I don=E2=80=99t see any obvious way > to simplify this part unfortunately because the > record is aggregated by =E2=80=98slim-configuration=E2=80=99 & co. (there= =E2=80=99s no Xorg > service that we could extend.) That=E2=80=99s something we can still imp= rove > afterwards, though. >=20 > Potentially controversial issues: >=20 > 1. The Xorg API is changed in an incompatible way: > =E2=80=98xorg-start-command=E2=80=99 has a different prototype, the = =E2=80=98startx=E2=80=99 > field of =E2=80=98slim-configuration=E2=80=99 is gone, etc. If you = were using > these, your config will have to be adjusted to use the new > =E2=80=98xorg-configuration=E2=80=99 record. (But hey, we=E2=80=99re= still pre-1.0!). >=20 > 2. Since both fields and the record constructor are called > =E2=80=98keyboard-layout=E2=80=99, you could easily have name clashe= s (it=E2=80=99s > more of an aesthetic consideration, not a showstopper.) >=20 > After that we should probably change the installer to generate > the right incantations. >=20 > These patches fix and > . >=20 > Feedback welcome! >=20 > And thanks to nee for the initial inspiration! >=20 > Ludo=E2=80=99. >=20 > Ludovic Court=C3=A8s (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 record type. > services: sddm, slim, gdm: Take an record. > services: xorg: Add a 'keyboard-layout' field in > . 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. >=20 > 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 >=20 Apart from the minor comments I already sent to patches 4, 6 and 8, LGTM! Thank you!