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 = { window = {
padding = { padding = {
@ -28,6 +30,6 @@
italic = mkFont "Italic"; italic = mkFont "Italic";
bold_italic = mkFont "Bold Italic"; bold_italic = mkFont "Bold Italic";
size = 8.0; size = fontSize;
}; };
} }

View file

@ -5,7 +5,7 @@ with lib;
let let
cfg = config.progs.alacritty; cfg = config.progs.alacritty;
alacrittyConfig = import ./config.nix; alacrittyConfig = import ./config.nix { inherit (cfg) fontSize; };
in in
{ {
options.progs.alacritty = { options.progs.alacritty = {
@ -14,6 +14,12 @@ in
default = false; default = false;
description = "Enable alacritty, GPU-accelerated terminal emulator"; description = "Enable alacritty, GPU-accelerated terminal emulator";
}; };
fontSize = mkOption {
type = types.number;
default = 11.0;
description = "Alacritty font size";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

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

View file

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