aszlig 69da1807f0
nixos/xserver: Allow more than one keyboard layout
Regression introduced by 44c64fef16ed566786c8db276085b484c9d233f3.

The services.xserver.layout option allows to specify more than one
layout separated by comma, which the commit above didn't take into
account.

This is very similar to @lheckemann's pull request (#26984) but differs
in the following ways:

  * Print out the full list available layouts (as suggested by @0xABAB
    in [1]).
  * Loop over $layout using the default IFS (and thus no need for
    escaping ${cfg.layout}), because the layouts won't contain white
    spaces.
  * Re-do the error message, which now uses multiple echos instead of a
    heredoc, so the line is wrapped according to the viewers terminal
    width.

I've tested this with several good and bad layouts and also against the
keymap NixOS VM subtests.

[1]: https://github.com/NixOS/nixpkgs/pull/26984#discussion_r125146700

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fixes: #26961
Closes: #26984
2017-07-03 08:29:20 +02:00
..
2017-06-19 19:03:39 +02:00
2017-06-30 00:52:22 +00:00
2017-06-30 13:32:45 +02:00
2017-07-02 04:37:51 +02:00
2017-02-11 13:55:09 -05:00
2017-06-27 12:01:53 +00:00