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