guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Brain storming cool Guix features


From: Joshua Branson
Subject: Re: Brain storming cool Guix features
Date: Sun, 13 Jan 2019 15:18:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Ricardo Wurmus <address@hidden> writes:

> Joshua Branson <address@hidden> 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 not 
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 ‘initrd’
     field of an ‘operating-system’ declaration allows you to specify which
     initrd you would like to use.  The ‘(gnu system linux-initrd)’ module
     provides three ways to build an initrd: the high-level ‘base-initrd’
     procedure and the low-level ‘raw-initrd’ and ‘expression->initrd’
     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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]