{ config, pkgs, lib, ... }:
{
  users.users.yoda = {
    packages = with pkgs; [
      libsForQt5.ghostwriter # Markdown editor
    ];
  };

  # This fixes blurry fonts with fractional scaling on Wayland.
  environment.sessionVariables.QT_QPA_PLATFORM = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) "wayland";

  home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
    home.file.".config/kde.org/ghostwriter.conf" = {
      text = ''
        [Application]
        locale=en_US

        [Preview]
        htmlPreviewOpen=false
        lastUsedExporter=cmark-gfm
        lastUsedExporterParams=

        [Save]
        autoSave=false
        backupFile=false

        [Style]
        largeHeadings=true

        [Tabs]
        insertSpacesForTabs=true
        tabWidth=2
      '';
    };
  };
}