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