nixpkgs/nixos/modules/programs/plotinus.nix
rnhmjoj 22d05f8fa2
nixos/plotinus: fix evaluation
Apparently setting a variable via `environment.variables` when the same
is already present in `environment.sessionVariables` (that is merged
into the former option) creates a conflict.

For reference: this started with the change in #101274.
2021-09-22 15:53:29 +02:00

37 lines
815 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.plotinus;
in
{
meta = {
maintainers = pkgs.plotinus.meta.maintainers;
doc = ./plotinus.xml;
};
###### interface
options = {
programs.plotinus = {
enable = mkOption {
default = false;
description = ''
Whether to enable the Plotinus GTK 3 plugin. Plotinus provides a
popup (triggered by Ctrl-Shift-P) to search the menus of a
compatible application.
'';
type = types.bool;
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.sessionVariables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
environment.variables.GTK3_MODULES = [ "${pkgs.plotinus}/lib/libplotinus.so" ];
};
}