2021-05-08 17:53:06 +02:00
|
|
|
{ config, lib, ... }:
|
2021-04-05 02:54:28 +02:00
|
|
|
let
|
|
|
|
mkColorOption = with lib; description: default: mkOption {
|
|
|
|
inherit description default;
|
|
|
|
example = "#abcdef";
|
|
|
|
type = types.strMatching "#[0-9a-f]{6}";
|
|
|
|
};
|
2021-05-08 17:53:06 +02:00
|
|
|
|
|
|
|
cfg = config.my.home.terminal;
|
2021-04-05 02:54:28 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
2021-09-25 15:29:48 +02:00
|
|
|
./termite
|
2021-04-05 02:54:28 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
options.my.home = with lib; {
|
|
|
|
terminal = {
|
2021-04-05 02:57:32 +02:00
|
|
|
program = mkOption {
|
|
|
|
type = with types; nullOr (enum [ "termite" ]);
|
|
|
|
default = null;
|
|
|
|
example = "termite";
|
|
|
|
description = "Which terminal to use for home session";
|
|
|
|
};
|
|
|
|
|
2021-04-05 02:54:28 +02:00
|
|
|
colors = {
|
|
|
|
background = mkColorOption "Background color" "#161616";
|
|
|
|
foreground = mkColorOption "Foreground color" "#ffffff";
|
|
|
|
foregroundBold = mkColorOption "Foreground bold color" "#ffffff";
|
|
|
|
cursor = mkColorOption "Cursor color" "#ffffff";
|
|
|
|
|
|
|
|
black = mkColorOption "Black" "#222222";
|
|
|
|
blackBold = mkColorOption "Black bold" "#666666";
|
|
|
|
|
|
|
|
red = mkColorOption "Red" "#e84f4f";
|
|
|
|
redBold = mkColorOption "Red bold" "#d23d3d";
|
|
|
|
|
|
|
|
green = mkColorOption "Green" "#b7ce42";
|
|
|
|
greenBold = mkColorOption "Green bold" "#bde077";
|
|
|
|
|
|
|
|
yellow = mkColorOption "Yellow" "#fea63c";
|
|
|
|
yellowBold = mkColorOption "Yellow bold" "#ffe863";
|
|
|
|
|
|
|
|
blue = mkColorOption "Blue" "#66aabb";
|
|
|
|
blueBold = mkColorOption "Blue bold" "#aaccbb";
|
|
|
|
|
|
|
|
magenta = mkColorOption "Magenta" "#b7416e";
|
|
|
|
magentaBold = mkColorOption "Magenta bold" "#e16a98";
|
|
|
|
|
|
|
|
cyan = mkColorOption "Cyan" "#6d878d";
|
|
|
|
cyanBold = mkColorOption "Cyan bold" "#42717b";
|
|
|
|
|
|
|
|
white = mkColorOption "White" "#dddddd";
|
|
|
|
whiteBold = mkColorOption "White bold" "#cccccc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-05-08 17:53:06 +02:00
|
|
|
|
|
|
|
config.home.sessionVariables = lib.mkIf (cfg.program != null) {
|
2021-05-15 13:56:07 +02:00
|
|
|
TERMINAL = cfg.program;
|
2021-05-08 17:53:06 +02:00
|
|
|
};
|
2021-04-05 02:54:28 +02:00
|
|
|
}
|