calcite: fix font size
This commit is contained in:
parent
5f40031b58
commit
7f3a0af1cb
4 changed files with 109 additions and 3 deletions
|
@ -78,6 +78,14 @@ in
|
||||||
};
|
};
|
||||||
neovim = {
|
neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
font = {
|
||||||
|
normal = [
|
||||||
|
"JetbrainsMono Nerd Font"
|
||||||
|
"Noto Sans Mono CJK SC"
|
||||||
|
"Ubuntu"
|
||||||
|
];
|
||||||
|
size = 12.0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
vscode = {
|
vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
"alacritty-zellij"
|
"alacritty-zellij"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
font.size = 10.0;
|
font.size = 12.0;
|
||||||
window = {
|
window = {
|
||||||
resize_increments = true;
|
resize_increments = true;
|
||||||
dynamic_padding = true;
|
dynamic_padding = true;
|
||||||
|
|
|
@ -5,9 +5,29 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption getExe;
|
inherit (lib)
|
||||||
|
mkIf
|
||||||
|
mkEnableOption
|
||||||
|
getExe
|
||||||
|
types
|
||||||
|
attrsets
|
||||||
|
;
|
||||||
cfg = config.custom-hm.neovim;
|
cfg = config.custom-hm.neovim;
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
fontItem =
|
||||||
|
with types;
|
||||||
|
either str (submodule {
|
||||||
|
options = {
|
||||||
|
family = {
|
||||||
|
type = str;
|
||||||
|
};
|
||||||
|
style = {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
fontType = types.either fontItem (types.listOf fontItem);
|
||||||
neovideConfig = {
|
neovideConfig = {
|
||||||
neovim-bin = getExe pkgs.nixvim;
|
neovim-bin = getExe pkgs.nixvim;
|
||||||
fork = true;
|
fork = true;
|
||||||
|
@ -17,6 +37,78 @@ in
|
||||||
{
|
{
|
||||||
options.custom-hm.neovim = {
|
options.custom-hm.neovim = {
|
||||||
enable = mkEnableOption "neovim configurations";
|
enable = mkEnableOption "neovim configurations";
|
||||||
|
font = {
|
||||||
|
# Required options
|
||||||
|
normal = lib.mkOption {
|
||||||
|
type = fontType;
|
||||||
|
description = ''
|
||||||
|
The normal font description. Can be:
|
||||||
|
- A table with "family" (required) and "style" (optional).
|
||||||
|
- A string indicating the font family.
|
||||||
|
- An array of strings or tables as described above.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
size = lib.mkOption {
|
||||||
|
type = lib.types.float;
|
||||||
|
description = "Required font size.";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Optional options
|
||||||
|
bold = lib.mkOption {
|
||||||
|
type = types.nullOr fontType;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Optional bold font description. Can be:
|
||||||
|
- A table with "family" (optional) and "style" (optional).
|
||||||
|
- A string indicating the font family.
|
||||||
|
- An array of strings or tables as described above.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
italic = lib.mkOption {
|
||||||
|
type = types.nullOr fontType;
|
||||||
|
default = null;
|
||||||
|
description = "Optional italic font description.";
|
||||||
|
};
|
||||||
|
|
||||||
|
bold_italic = lib.mkOption {
|
||||||
|
type = types.nullOr fontType;
|
||||||
|
default = null;
|
||||||
|
description = "Optional bold-italic font description.";
|
||||||
|
};
|
||||||
|
|
||||||
|
features = lib.mkOption {
|
||||||
|
type = types.nullOr (lib.types.attrsOf (lib.types.listOf lib.types.str));
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Optional font features. A table where the key is the font family and
|
||||||
|
the value is a list of font features. Each feature can be:
|
||||||
|
- +<feature> (e.g., +ss01)
|
||||||
|
- -<feature> (e.g., -calt)
|
||||||
|
- <feature>=<value> (e.g., ss02=2)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
width = lib.mkOption {
|
||||||
|
type = types.nullOr types.float;
|
||||||
|
default = null;
|
||||||
|
description = "Optional font width.";
|
||||||
|
};
|
||||||
|
|
||||||
|
hinting = lib.mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Optional font hinting (none, slight, medium, full).";
|
||||||
|
};
|
||||||
|
|
||||||
|
edging = lib.mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Optional font edging (none, antialiased, subpixel).";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -25,7 +117,12 @@ in
|
||||||
];
|
];
|
||||||
programs.neovim.enable = false;
|
programs.neovim.enable = false;
|
||||||
home.file.".config/neovide/config.toml" = {
|
home.file.".config/neovide/config.toml" = {
|
||||||
source = tomlFormat.generate "neovide-config" neovideConfig;
|
source = tomlFormat.generate "neovide-config" (
|
||||||
|
neovideConfig
|
||||||
|
// (attrsets.filterAttrsRecursive (n: v: v != null) {
|
||||||
|
font = cfg.font;
|
||||||
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ in
|
||||||
unbind "Alt h" "Alt l" "Alt j" "Alt k"
|
unbind "Alt h" "Alt l" "Alt j" "Alt k"
|
||||||
}
|
}
|
||||||
unbind "Ctrl p" "Ctrl n"
|
unbind "Ctrl p" "Ctrl n"
|
||||||
|
unbind "Alt f"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue