From 1c147613e45ea206f5324899eed26f3c35d57662 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 8 May 2021 17:53:06 +0200 Subject: [PATCH] home: terminal: export TERMINAL when appropriate This is used by some programs, like 'rofi' to launch terminal programs. --- home/terminal/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/home/terminal/default.nix b/home/terminal/default.nix index 4c3f5cb..676eed9 100644 --- a/home/terminal/default.nix +++ b/home/terminal/default.nix @@ -1,10 +1,12 @@ -{ lib, ... }: +{ config, lib, ... }: let mkColorOption = with lib; description: default: mkOption { inherit description default; example = "#abcdef"; type = types.strMatching "#[0-9a-f]{6}"; }; + + cfg = config.my.home.terminal; in { imports = [ @@ -52,4 +54,8 @@ in }; }; }; + + config.home.sessionVariables = lib.mkIf (cfg.program != null) { + TERMINAL = "termite"; + }; }