1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8let
9 cfg = config.programs.plotinus;
10in
11{
12 meta = {
13 maintainers = pkgs.plotinus.meta.maintainers;
14 doc = ./plotinus.md;
15 };
16
17 ###### interface
18
19 options = {
20 programs.plotinus = {
21 enable = lib.mkOption {
22 default = false;
23 description = ''
24 Whether to enable the Plotinus GTK 3 plugin. Plotinus provides a
25 popup (triggered by Ctrl-Shift-P) to search the menus of a
26 compatible application.
27 '';
28 type = lib.types.bool;
29 };
30 };
31 };
32
33 ###### implementation
34
35 config = lib.mkIf cfg.enable {
36 environment.sessionVariables.XDG_DATA_DIRS = [
37 "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}"
38 ];
39 environment.variables.GTK3_MODULES = [ "${pkgs.plotinus}/lib/libplotinus.so" ];
40 };
41}