2022-08-28 15:23:16 +03:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.progs.alacritty;
|
|
|
|
|
2022-09-26 04:07:33 +03:00
|
|
|
alacrittyConfig = import ./config.nix { inherit (cfg) fontSize; };
|
2022-08-28 15:23:16 +03:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.progs.alacritty = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Enable alacritty, GPU-accelerated terminal emulator";
|
|
|
|
};
|
2022-09-26 04:07:33 +03:00
|
|
|
|
|
|
|
fontSize = mkOption {
|
|
|
|
type = types.number;
|
|
|
|
default = 11.0;
|
|
|
|
description = "Alacritty font size";
|
|
|
|
};
|
2022-08-28 15:23:16 +03:00
|
|
|
};
|
2022-08-29 15:40:41 +03:00
|
|
|
|
2022-08-28 15:23:16 +03:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.alacritty = {
|
|
|
|
enable = true;
|
|
|
|
settings = alacrittyConfig;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|