{ pkgs, lib, config, ... }: let inherit (lib) mkEnableOption mkIf; cfg = config.my.libreoffice; in { options.my.libreoffice = { enable = mkEnableOption "libreoffice"; }; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ libreoffice-qt hunspell hunspellDicts.uk_UA hunspellDicts.th_TH ]; }; }