nix-conf/modules/keyboard/default.nix
2024-07-10 23:02:54 +02:00

32 lines
493 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.jopejoe1.keyboard;
in
{
options.jopejoe1.keyboard = {
enable = lib.mkEnableOption "Enable Keyboard";
layout = lib.mkOption {
type = lib.types.str;
default = "us";
description = lib.mdDoc "Keyboard Layout.";
};
};
config = lib.mkIf cfg.enable {
services = {
xserver = {
xkb.layout = cfg.layout;
};
};
console = {
enable = true;
keyMap = "de";
};
};
}