home: terminal: export TERMINAL when appropriate

This is used by some programs, like 'rofi' to launch terminal programs.
This commit is contained in:
Bruno BELANYI 2021-05-08 17:53:06 +02:00
parent 2daaaed37f
commit ec7f62f7bc

View file

@ -1,10 +1,12 @@
{ lib, ... }: { config, lib, ... }:
let let
mkColorOption = with lib; description: default: mkOption { mkColorOption = with lib; description: default: mkOption {
inherit description default; inherit description default;
example = "#abcdef"; example = "#abcdef";
type = types.strMatching "#[0-9a-f]{6}"; type = types.strMatching "#[0-9a-f]{6}";
}; };
cfg = config.my.home.terminal;
in in
{ {
imports = [ imports = [
@ -52,4 +54,8 @@ in
}; };
}; };
}; };
config.home.sessionVariables = lib.mkIf (cfg.program != null) {
TERMINAL = "termite";
};
} }