Nixfiles/gui/wm/terminal/default.nix
Quentin Boyer 361b443ac7 gui,personal-gui: Split GUI module in two distinct modules
This is mainly for work vs personal computers
2024-07-24 17:35:44 +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";
};
};
};
};
}