From bda59eeb4ae1c4911a35dcf080c4d22f08135357 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:37:22 -0400 Subject: [PATCH] enable num lock on login --- modules/nixos/hardware/keyboard.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/modules/nixos/hardware/keyboard.nix b/modules/nixos/hardware/keyboard.nix index e5eee1b..4c23bee 100644 --- a/modules/nixos/hardware/keyboard.nix +++ b/modules/nixos/hardware/keyboard.nix @@ -1,15 +1,22 @@ -{ ... }: { +{ config, ... }: { - services.xserver = { + config = { - layout = "us"; + services.xserver = { - # Keyboard responsiveness - autoRepeatDelay = 250; - autoRepeatInterval = 40; + layout = "us"; - # Swap escape key with caps lock key - xkbOptions = "eurosign:e,caps:swapescape"; + # Keyboard responsiveness + autoRepeatDelay = 250; + autoRepeatInterval = 40; + + # Swap escape key with caps lock key + xkbOptions = "eurosign:e,caps:swapescape"; + + }; + + # Enable num lock on login + home-manager.users.${config.user}.xsession.numlock.enable = true; };