From ae2737458b6c8f0bb96e7a14ec6b6ebd19f1b564 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 May 2024 10:33:59 +1000 Subject: [PATCH] Update enabled numlock at boot --- components/base-software.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/base-software.nix b/components/base-software.nix index 8f8bd6f..88777f6 100644 --- a/components/base-software.nix +++ b/components/base-software.nix @@ -52,6 +52,19 @@ xkbVariant = ""; }; + # Enable Numlock being turned on at startup + systemd.services.numLockOnTty = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + # /run/current-system/sw/bin/setleds -D +num < "$tty"; + ExecStart = lib.mkForce (pkgs.writeShellScript "numLockOnTty" '' + for tty in /dev/tty{1..6}; do + ${pkgs.kbd}/bin/setleds -D +num < "$tty"; + done + ''); + }; + }; + # Enable CUPS to print documents. services.printing.enable = true; # Print auto discovery is not working seeing if this fixes it.