system/users/jan/progs/alacritty/default.nix

31 lines
592 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.progs.alacritty;
alacrittyConfig = import ./config.nix { inherit (cfg) fontSize; };
in
{
options.progs.alacritty = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable alacritty, GPU-accelerated terminal emulator";
};
fontSize = mkOption {
type = types.number;
default = 11.0;
description = "Alacritty font size";
};
};
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = alacrittyConfig;
};
};
}