[Nix-dev] [nixos-0.1pre8369][newbie] - Switching keyboard layout in live CD system

Eelco Dolstra eelco at cs.uu.nl
Thu Apr 19 18:22:00 CEST 2007


Hi,

Heribert Slama wrote:

> What I expect most from NixOS: derivation of config files (/etc stuff)
> from Nix expressions. It would be great if Nix could upgrade the
> configuration of a package without bothering the user (while still
> carrying over user supplied parameters to the new version). I couldn't
> find anything about this topic on the website.

We have a paper in the Usenix HotOS workshop about configuration management in
NixOS entitled "Purely Functional System Configuration Management" that talks
about this.  A preprint is here: http://www.cs.uu.nl/~eelco/pubs/hotos-final.pdf

> I've tried to boot from the live CD (i686). Hardware recognition is
> fine, even the ethernet card was correctly identified, IP-address,
> gateway and name servers correctly set by the ADSL router's DHCP server.

Great :-)

> Then I got stuck due to my _keyboard_ layout - Swiss German - (TTY:
> sg[-latin1], X: de_CH. How can I switch a TTY's keyboard? (With Knoppix
> I use 'loadkeys sg-latin1'). The DE-layout is no big help, since many
> _special characters_ are assigned to different keys.

I've added loadkeys (and other international support) very recently, so I'll
generate a new ISO image shortly.  It's also possible now to set the locale and
the console font.

When installing from CD you can just run loadkeys to set the keyboard map, but
to make it permanent you can put something like this in
/etc/nixos/configuration.nix:

  i18n = {
    consoleKeyMap = "sg-latin1";
    defaultLocale = "de_CH.UTF-8";
  };

I don't think that this changes the X keymap in any way, but it's possible to do
that in the KDE control center at least.

> Finally about Grub: Since I want to keep my 4 existing systems (Windows
> 2000, Ubuntu 6.06, Open Suse 10.1, Fedora Core 6; all just for fooling
> around;-), I must install grub manually. This seems to be the default -
>         boot.grubDevice = ""
> Would it work, to specify
>         boot.grubDevice = "/dev/hda10"
> to install grub in the _partition_ boot sector of the NixOS file system?

Yes, this is what I do on my laptop (the configuration of which is here:
https://svn.cs.uu.nl:12443/repos/trace/configurations/trunk/misc/eelco-tyros.nix).
   I have SUSE's Grub on /dev/hda which chainloads the NixOS Grub on /dev/hda4.
 The menu.lst of the SUSE Grub has this entry:

title NixOS Grub
    root (hd0,3)
    chainloader +1

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list