25 lines
476 B
Nix
25 lines
476 B
Nix
|
{ 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
|
||
|
);
|
||
|
};
|
||
|
}
|