Nixfiles/gui/terminal/default.nix
traxys 9e324f0b83 gui: Split wm module out of the gui module
Allowing to use DEs on select machines
2024-08-08 21:48:57 +02:00

80 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
...
}:
with lib;
with builtins;
let
mkColor = mkOption {
type = types.nullOr types.str;
default = null;
};
mkColorPair = {
normal = mkColor;
bright = mkColor;
};
cfg = config.terminal;
cCfg = cfg.colors;
in
{
imports = [
./foot.nix
./kitty.nix
];
options = {
terminal = {
enable = mkOption {
type = types.bool;
default = false;
description = "Manage terminal";
};
kind = mkOption {
type = types.enum [
"foot"
"kitty"
];
default = "foot";
description = "The terminal to be used";
};
command = mkOption {
type = types.str;
description = "The command used to launch the terminal";
};
colors = {
background = mkColor;
foreground = mkColor;
black = mkColorPair;
red = mkColorPair;
green = mkColorPair;
yellow = mkColorPair;
blue = mkColorPair;
magenta = mkColorPair;
cyan = mkColorPair;
white = mkColorPair;
urls = mkColor;
selection = {
background = mkColor;
foreground = mkColor;
};
};
font = {
size = mkOption {
type = types.number;
default = 12;
description = "terminal font size";
};
family = mkOption {
type = types.str;
default = "monospace";
description = "font family";
};
};
};
};
}