mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 23:35:36 +00:00
42 lines
804 B
Nix
42 lines
804 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
|
|
config = lib.mkIf config.physical {
|
|
|
|
services.xserver = {
|
|
|
|
xkb.layout = "us";
|
|
|
|
# Keyboard responsiveness
|
|
autoRepeatDelay = 250;
|
|
autoRepeatInterval = 40;
|
|
};
|
|
|
|
# Use capslock as escape and/or control
|
|
services.keyd = {
|
|
enable = true;
|
|
keyboards = {
|
|
default = {
|
|
ids = [ "*" ];
|
|
settings = {
|
|
main = {
|
|
capslock = "overload(control, esc)";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# For some reason, keyd doesn't restart properly when updating
|
|
system.activationScripts.keyd.text = "${pkgs.systemd}/bin/systemctl restart keyd.service";
|
|
|
|
# Enable num lock on login
|
|
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
|
};
|
|
}
|