From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joshua Branson Subject: Re: Brain storming cool Guix features Date: Sun, 13 Jan 2019 15:18:25 -0500 Message-ID: <87imyss44u.fsf@dismail.de> References: <87bm4wwrku.fsf@dismail.de> <877efktnry.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:45467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gimDQ-0007cv-5y for guix-devel@gnu.org; Sun, 13 Jan 2019 15:18:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gimDO-00087d-AI for guix-devel@gnu.org; Sun, 13 Jan 2019 15:18:40 -0500 Received: from dismail.de ([78.46.223.134]:10852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gimDN-00081i-AL for guix-devel@gnu.org; Sun, 13 Jan 2019 15:18:38 -0500 Received: from dismail.de (localhost [127.0.0.1]) by dismail.de (OpenSMTPD) with ESMTP id bcf00979 for ; Sun, 13 Jan 2019 21:18:28 +0100 (CET) Received: from smtp1.dismail.de (10.240.26.11 [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 3684599c for ; Sun, 13 Jan 2019 21:18:27 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id da7c507b for ; Sun, 13 Jan 2019 21:18:27 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 142ea93f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sun, 13 Jan 2019 21:18:27 +0100 (CET) In-Reply-To: <877efktnry.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 04 Jan 2019 17:01:37 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Ricardo Wurmus writes: > Joshua Branson writes: > >> I had some cool ideas/features for things that GuixSD could potentially >> add, and I wanted to share. Are any of these possible? >> >> #+BEGIN_SRC scheme >> (operating system >> (keymap "dvorak") >> ...) >> #+END_SRC >> >> The above would make the bootloader, console, X, and wayland all use the >> dvorak layout. That would be a nice feature! I currently use "dvorak", >> and it's slightly annoying that grub uses qwerty. :( > > Same here. Some of this might be accomplished with a system service > that extends configuration files with the required settings. Would you > like to give this a try? > Here's what I have been able to do for this week. td;dr I believe I have identified conceptually how to do some of these things. This project breaks down into four areas Getting the layout to work with: 1) grub 2) linux's initrd 3) console 4) X/wayland's layout 5) How to do the above 1) I was not able to get grub to generate an alternate keyboard layout. #+BEGIN_SRC sh :results output :exports both sudo grub-kbdcomp -o /boot/grub/dvorak.gkb dvorak #+END_SRC #+RESULTS: : /home/joshua/.guix-profile/bin/grub-kbdcomp: line 76: ckbcomp: command no= t found : ERROR: no valid keyboard layout found. Check the input. Do we have ckbcomp installed? How do I install that? 2) Linux's initrd The manual mentions that there are three ways to customize your initrd. Hopefully I'll be able to use the highlevel base-initrd procedure. Furthermore, if you need lower-level customization, the =E2=80=98in= itrd=E2=80=99 field of an =E2=80=98operating-system=E2=80=99 declaration allows you = to specify which initrd you would like to use. The =E2=80=98(gnu system linux-initrd)= =E2=80=99 module provides three ways to build an initrd: the high-level =E2=80=98base-i= nitrd=E2=80=99 procedure and the low-level =E2=80=98raw-initrd=E2=80=99 and =E2=80=98= expression->initrd=E2=80=99 procedures. 3) console This shouldn't be all that hard to do. We just have to add a console-keymap-service. 4) X/Wayland's layout shouldn't be all that hard to do too. X is just a simple xorg-start-command tweak. I'm not certain how to do the same for wayland yet. 5) Now, how do I go about doing the above? I thought about modifying %base-services and %desktop services, but some users won't use those variables. So I am going to have to do some change at a deeper level. I believe that I found the reconfigure module in the guix source code, and I see the variable called "operating-system-user-services". My intent is to modify this variable, and that should be how a good-old reconfigure will change your layout. Thanks, -- Joshua Branson Sent from Emacs and Gnus