Reviewed-on: https://gitea.mrdev023.fr/florian.richer/nixos/pulls/1 Co-authored-by: Florian RICHER <florian.richer@protonmail.com> Co-committed-by: Florian RICHER <florian.richer@protonmail.com>
This commit is contained in:
parent
e9329e63dc
commit
b7f82f87e8
84 changed files with 1100 additions and 1247 deletions
23
modules/system/hardware/keymaps/default.nix
Normal file
23
modules/system/hardware/keymaps/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.hardware.keymaps;
|
||||
in
|
||||
{
|
||||
options.modules.system.hardware.keymaps = {
|
||||
layout = mkOption {
|
||||
default = "fr";
|
||||
example = "fr";
|
||||
description = ''
|
||||
Set key layout (fr, us)
|
||||
'';
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.layout == "fr") (import ./fr.nix {}))
|
||||
(mkIf (cfg.layout == "us") (import ./us.nix {}))
|
||||
];
|
||||
}
|
||||
|
13
modules/system/hardware/keymaps/fr.nix
Normal file
13
modules/system/hardware/keymaps/fr.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "fr";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "fr";
|
||||
}
|
13
modules/system/hardware/keymaps/us.nix
Normal file
13
modules/system/hardware/keymaps/us.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue