42 lines
804 B
Nix
Raw Normal View History

2024-04-20 09:42:06 -04:00
{
config,
pkgs,
lib,
...
}:
{
2022-04-28 22:12:16 -04:00
2024-03-24 14:55:17 -04:00
config = lib.mkIf config.physical {
2022-05-29 13:44:45 -04:00
2023-03-21 18:37:22 -04:00
services.xserver = {
2022-05-29 13:44:45 -04:00
2024-02-06 23:41:28 -05:00
xkb.layout = "us";
2022-04-28 22:12:16 -04:00
2023-03-21 18:37:22 -04:00
# Keyboard responsiveness
autoRepeatDelay = 250;
autoRepeatInterval = 40;
2023-06-05 23:50:01 -04:00
};
2023-03-21 18:37:22 -04:00
2023-06-05 23:50:01 -04:00
# Use capslock as escape and/or control
services.keyd = {
enable = true;
2023-07-25 03:16:48 +00:00
keyboards = {
default = {
ids = [ "*" ];
2024-04-20 09:42:06 -04:00
settings = {
main = {
capslock = "overload(control, esc)";
};
};
2023-07-25 03:16:48 +00:00
};
};
2023-03-21 18:37:22 -04:00
};
# For some reason, keyd doesn't restart properly when updating
2024-04-20 09:42:06 -04:00
system.activationScripts.keyd.text = "${pkgs.systemd}/bin/systemctl restart keyd.service";
2023-03-21 18:37:22 -04:00
# Enable num lock on login
home-manager.users.${config.user}.xsession.numlock.enable = true;
2022-04-28 22:12:16 -04:00
};
}