nixos-config/home/alacritty.nix

52 lines
898 B
Nix
Raw Normal View History

2022-04-10 11:54:58 +02:00
{
config,
lib,
pkgs,
...
}: let
inherit
(lib)
2022-01-11 16:08:21 +01:00
mkEnableOption
mkIf
2022-04-10 11:54:58 +02:00
;
2022-01-11 16:08:21 +01:00
2021-04-22 00:25:39 +02:00
cfg = config.my.home.alacritty;
alacrittyTheme = config.my.theme.alacrittyTheme;
2022-04-10 11:54:58 +02:00
in {
options.my.home.alacritty.enable = (mkEnableOption "Alacritty terminal") // {default = config.my.home.x.enable;};
2021-04-22 00:25:39 +02:00
2022-01-11 16:08:21 +01:00
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
2021-04-22 00:25:39 +02:00
settings = {
2021-07-24 01:53:01 +02:00
env = {
WINIT_X11_SCALE_FACTOR = "1.0";
};
window = {
padding = {
x = 8;
y = 8;
};
2021-04-22 00:25:39 +02:00
};
font = {
normal = {
family = "Iosevka Fixed";
style = "Medium";
};
size = 10.0;
2021-04-22 00:25:39 +02:00
};
colors = alacrittyTheme;
};
2021-04-22 00:25:39 +02:00
};
2022-04-10 11:54:58 +02:00
home.packages = [pkgs.iosevka-bin];
2022-01-11 16:08:21 +01:00
# make sure font is discoverable
fonts.fontconfig.enable = true;
2021-04-22 00:25:39 +02:00
};
}