{ pkgs, ... }:
{
  # 시간대 설정
  time.timeZone = "Asia/Seoul";

  # 로케일 설정 (영어 기본 + 한국 로케일)
  i18n = {
    defaultLocale = "en_US.UTF-8";
    extraLocaleSettings = {
      LC_ADDRESS = "en_US.UTF-8";
      LC_IDENTIFICATION = "en_US.UTF-8";
      LC_MEASUREMENT = "en_US.UTF-8";
      LC_MONETARY = "en_US.UTF-8";
      LC_NAME = "en_US.UTF-8";
      LC_NUMERIC = "en_US.UTF-8";
      LC_PAPER = "en_US.UTF-8";
      LC_TELEPHONE = "en_US.UTF-8";
      LC_TIME = "en_US.UTF-8";
    };
  };

  i18n.inputMethod = {
    enable = true;
    type = "fcitx5";
    fcitx5 = {
      settings.globalOptions = {
        "Hotkey/TriggerKeys" = {
          "0" = "Hangul";
        };
        "Hotkey/ActivateKeys" = {
          "0" = "Hangul_Hanja";
        };
        "Hotkey/DeactivateKeys" = {
          "0" = "Hangul_Romaja";
        };
        "Hotkey/EnumerateGroupForwardKeys" = {
          "0" = "Super+space";
        };
        "Hotkey/PrevPage" = {
          "0" = "Up";
        };
        "Hotkey/NextPage" = {
          "0" = "Down";
        };
        "Hotkey" = {
          "AltTriggerKeys" = "";
          "EnumerateForwardKeys" = "";
          "EnumerateBackwardKeys" = "";
        };
      };
    };
    fcitx5.addons = with pkgs; [
      fcitx5-hangul
    ];
  };

  environment.sessionVariables = {
    GTK_IM_MODULE = "fcitx";
    QT_IM_MODULE = "fcitx";
    XMODIFIERS = "@im=fcitx";
  };
}
