{ config, pkgs, lib, ... }:
{
  i18n.inputMethod = {
    enable = true;
    enableGtk3 = true;
    enableGtk2 = true;
    type = "fcitx5";
    fcitx5 = {
      addons = with pkgs; [
        fcitx5-skk
      ];
    };
  };

  services.xserver = {
    enable = true;
    xkb = {
      layout = "us";
    };
    dpi = lib.mkDefault 96;
    displayManager.lightdm = {
      enable = true;
      greeters.gtk = {
        enable = true;
      };
    };
  };

  fonts = {
    fontDir.enable = true;
    fontconfig = {
      defaultFonts = {
        emoji = [ "Noto Color Emoji" ];
        monospace = [ "Moralerspace Argon" ];
        sansSerif = [ "Noto Sans" ];
        serif = [ "Noto Serif" ];
      };
    };
    packages = with pkgs; [
      nerd-fonts._0xproto
      nerd-fonts.fira-code
      moralerspace
      gyre-fonts
      ipafont
      jigmo
      noto-fonts
      noto-fonts-cjk-sans
      noto-fonts-cjk-serif
      corefonts
      noto-fonts-color-emoji
    ];
  };

  services.libinput = lib.mkDefault {
    enable = true;
    touchpad = {
      tapping = true;
      scrollMethod = "twofinger";
      disableWhileTyping = true;
      accelProfile = "flat";
      accelSpeed = "0.5";
    };
  };

  xdg.portal = {
    enable = true;
  };

  security.polkit.enable = true;

  environment.systemPackages = (with pkgs; [
    alacritty
    xfe
    feh
    keepassxc
    gnucash
    owncloud-client
    thunderbird
    libreoffice-fresh
    kdePackages.spectacle
    kdePackages.gwenview
    kdePackages.okular
    fontconfig
  ]) ++ (with pkgs.skkDictionaries; [
    l
    emoji
    edict
    assoc
    itaiji
  ]);
}
