I use a keyboard layout based on Colemak mod Dh with better Hungarian support by adding support for ő and ű keys.

partial alphanumeric_keys
xkb_symbols "col-lv" {
  include "us(colemak_dh_ortho)"
  name[Group1]= "English/Hungarian (Colemak-DH Ortholinear)";
 
  key <AC11> { [   apostrophe,     quotedbl,         odoubleacute,          Odoubleacute ] };
  key <AD07> { [            l,            L,         udoubleacute,          Udoubleacute ] };
};
keymaps/symbols/col-lv
partial alphanumeric_keys
xkb_symbols "altgr-ceur" {
  include "us(altgr-weur)"
  name[Group1]= "English/Hungarian (Central European AltGr dead keys)";
 
  key <AC06> { [         h,          H,      udoubleacute,        Udoubleacute ] };
  key <AC10> { [ semicolon,      colon,      odoubleacute,        Odoubleacute ] };
};
{ pkgs, ... }:
 
{
  console.font = "${pkgs.terminus_font}/share/consolefonts/ter-220b.psf.gz"; # ISO-8859-2 10x20 bold
  console.earlySetup = true;
  console.useXkbConfig = true;
  i18n.defaultLocale = "hu_HU.UTF-8";
 
  environment.systemPackages = [ pkgs.colemak-dh ];
 
  services.xserver.xkb = {
    layout = "col-lv,altgr-ceur,us,hu";
    options = "grp:alt_altgr_toggle, compose:rctrl, caps:escape";
    extraLayouts."col-lv" = {
      description = "English/Hungarian (Colemak-DH Ortholinear)";
      languages = [
        "eng"
        "hun"
      ];
      symbolsFile = ./keymaps/symbols/col-lv;
    };
    extraLayouts."altgr-ceur" = {
      description = "English/Hungarian (Central European AltGr dead keys)";
      languages = [
        "eng"
        "hun"
      ];
      symbolsFile = ./keymaps/symbols/altgr-ceur;
    };
  };
}
nixos