home/alacritty: config font size via param

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-26 04:07:33 +03:00
parent eee610c691
commit 495d6d9524
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 24 additions and 6 deletions

View file

@ -1,3 +1,5 @@
{ fontSize ? 11.0 }:
{
window = {
padding = {
@ -28,6 +30,6 @@
italic = mkFont "Italic";
bold_italic = mkFont "Bold Italic";
size = 8.0;
size = fontSize;
};
}

View file

@ -5,7 +5,7 @@ with lib;
let
cfg = config.progs.alacritty;
alacrittyConfig = import ./config.nix;
alacrittyConfig = import ./config.nix { inherit (cfg) fontSize; };
in
{
options.progs.alacritty = {
@ -14,6 +14,12 @@ in
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 {

View file

@ -4,6 +4,9 @@ switchSys = nixos-rebuild switch --flake
home-me: fix-systemd
${switchHm} .#home-me
home-laptop-me: fix-systemd
${switchHm} .#home-laptop-me
sys-home:
sudo ${switchSys} .#system-home

View file

@ -13,14 +13,21 @@ let
inputs.nil.overlays.default
];
};
in
{
home-me = home-manager.lib.homeManagerConfiguration {
mkHome = mods: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
inputs.wired.homeManagerModules.default
../home/home.nix
];
] ++ mods;
};
in
{
home-me = mkHome [ ];
home-laptop-me = mkHome [
({ config, ... }: {
progs.alacritty.fontSize = 8.0;
})
];
}