Enabling the EURKey Layout on NixOS with GNOME and Home-Manager

I recently switched the management of my PC to NixOS and Home-Manager. While everything went smoothly, I noticed that the EURKey Layout was missing in GNOME. It took me some time to enable it again, so hereโ€™s how you can do it.

Prerequisites

This guide assumes you have a fully working GNOME setup and Home-Manager configured.

Steps

  1. Add the following to your home.nix file:
dconf.settings = {
    "org/gnome/desktop/input-sources" = {
      show-all-sources = true;
      sources = [ (lib.hm.gvariant.mkTuple[ "xkb" "eu" ]) ];
      xkb-options = "";
    };
  };

Via https://discourse.nixos.org/t/keyboard-layout-with-gnome/21996/9, thanks.