Enable numlock on GDM?

GDM uses Wayland by default so random services that expect X server will not work. Furthermore, to support both X server and Wayland GNOME is not supposed to be controlled through X-specific settings but rather through gnome-setting-daemon, which abstracts many of the low-level details.

If you have home-manager enabled in your NixOS configuration, you should be able to just set the following for gdm user:

dconf.settings = {
  "org/gnome/settings-daemon/peripherals/keyboard" = {
    numlock-state = "on";
  };
};

Edit: the settings were moved, see the comment below.

It is possible to achieve it without home-manager but it requires a bit more code, see the last paragraph in Need help for NixOS Gnome scaling settings - #5 by jtojnar.

1 Like