2022-12-11 00:00:49 +00:00
|
|
|
{ config
|
|
|
|
, proj_root
|
|
|
|
, myLib
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (myLib) fromYaml;
|
|
|
|
actualConfig = fromYaml (builtins.readFile "${proj_root}//alacritty/alacritty.yml");
|
|
|
|
cfg = config.base.alacritty;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.base.alacritty.font.family = myLib.mkOption {
|
|
|
|
type = myLib.types.singleLineStr;
|
|
|
|
default = actualConfig.font.normal.family;
|
|
|
|
description = ''
|
|
|
|
The font family for Alacritty
|
|
|
|
'';
|
|
|
|
example = "DroidSansMono NF";
|
|
|
|
};
|
|
|
|
options.base.alacritty.enable = myLib.mkOption {
|
|
|
|
type = myLib.types.bool;
|
|
|
|
default = true;
|
|
|
|
description = ''
|
|
|
|
Enables alacritty
|
|
|
|
'';
|
|
|
|
example = true;
|
|
|
|
};
|
2022-12-13 18:42:17 +00:00
|
|
|
options.base.alacritty._actualConfig = myLib.mkOption {
|
|
|
|
type = myLib.types.attrs;
|
|
|
|
visible = false;
|
|
|
|
default = actualConfig;
|
|
|
|
description = "underlying default config";
|
|
|
|
};
|
2022-12-11 00:00:49 +00:00
|
|
|
|
|
|
|
config.programs.alacritty = {
|
|
|
|
enable = cfg.enable;
|
2022-12-13 18:42:17 +00:00
|
|
|
settings = myLib.recursiveUpdate actualConfig {
|
2022-12-11 00:00:49 +00:00
|
|
|
font.normal.family = cfg.font.family;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|