system/modules/home-manager/programs/libreoffice.nix

25 lines
476 B
Nix
Raw Normal View History

2024-04-16 02:51:46 +03:00
{ config, pkgs, lib, ... }:
let
cfg = config.local.programs.libreoffice;
in
{
options.local.programs.libreoffice = with lib; {
enable = mkEnableOption "libreoffice";
spellCheckDicts = mkOption {
type = types.listOf types.package;
default = [ ];
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; (
[ libreoffice ]
++ lib.optional (cfg.spellCheckDicts != [ ]) hunspell
++ cfg.spellCheckDicts
);
};
}