mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-01 14:36:34 +01:00
32 lines
499 B
Nix
32 lines
499 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 = cfg.layout;
|
|
};
|
|
};
|
|
}
|