1
1
Fork 0

fonts: move from top-level to fonts.nix

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-01-01 11:44:31 -06:00
parent bd449ebd8c
commit 7c53906edb
Signed by: Myned
GPG key ID: C7224454F7881A34
18 changed files with 40 additions and 41 deletions

View file

@ -61,12 +61,5 @@ in {
desktop = mkOption {default = "google-chrome.desktop";};
};
font = {
emoji = mkOption {default = "Noto Color Emoji";};
monospace = mkOption {default = "IosevkaTerm NFP SemiBold";};
sans-serif = mkOption {default = "Outfit";};
serif = mkOption {default = "Liberation Serif";};
};
};
}

View file

@ -49,7 +49,7 @@ in {
bar_padding = 10;
bar_precedence_over_border = true; # Render borders around hyprbars
bar_text_align = "left";
bar_text_font = config.custom.font.monospace;
bar_text_font = config.custom.settings.fonts.monospace;
bar_text_size = 11;
#// bar_title_enabled = false;
"col.text" = "rgb(93a1a1)";

View file

@ -185,7 +185,7 @@ in {
disable_hyprland_logo = true;
disable_splash_rendering = true;
focus_on_activate = true;
font_family = config.custom.font.monospace;
font_family = config.custom.settings.fonts.monospace;
force_default_wallpaper = 0;
initial_workspace_tracking = 2; # All children
key_press_enables_dpms = true;

View file

@ -47,7 +47,7 @@ in {
*:focus { outline: none; }
#window {
font: 16px ${config.custom.font.monospace};
font: 16px ${config.custom.settings.fonts.monospace};
background: none;
}

View file

@ -72,15 +72,15 @@ in {
"gnomeTheme.bookmarksToolbarUnderTabs" = true;
#// "gnomeTheme.systemIcons" = true;
"font.default.x-unicode" = config.custom.font.sans-serif;
"font.default.x-western" = config.custom.font.sans-serif;
"font.name-list.emoji" = config.custom.font.emoji; # System emoji
"font.name.monospace.x-unicode" = config.custom.font.monospace;
"font.name.monospace.x-western" = config.custom.font.monospace;
"font.name.sans-serif.x-unicode" = config.custom.font.sans-serif;
"font.name.sans-serif.x-western" = config.custom.font.sans-serif;
"font.name.serif.x-unicode" = config.custom.font.sans-serif;
"font.name.serif.x-western" = config.custom.font.sans-serif;
"font.default.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.default.x-western" = config.custom.settings.fonts.sans-serif;
"font.name-list.emoji" = config.custom.settings.fonts.emoji; # System emoji
"font.name.monospace.x-unicode" = config.custom.settings.fonts.monospace;
"font.name.monospace.x-western" = config.custom.settings.fonts.monospace;
"font.name.sans-serif.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.name.sans-serif.x-western" = config.custom.settings.fonts.sans-serif;
"font.name.serif.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.name.serif.x-western" = config.custom.settings.fonts.sans-serif;
"full-screen-api.ignore-widgets" = false; # Fake fullscreen
"full-screen-api.warning.delay" = -1;
"full-screen-api.warning.timeout" = 0;

View file

@ -15,7 +15,7 @@ in {
# https://codeberg.org/dnkl/foot/src/branch/master/foot.ini
settings = {
main.font = "${config.custom.font.monospace}:size=12";
main.font = "${config.custom.settings.fonts.monospace}:size=12";
scrollback.lines = 10000; # Default 1000
# Solarized Dark

View file

@ -56,7 +56,7 @@ in {
# Time
{
color = "rgb(93a1a1)";
font_family = config.custom.font.sans-serif;
font_family = config.custom.settings.fonts.sans-serif;
font_size = 64;
halign = "center";
position = "0, 200";
@ -73,7 +73,7 @@ in {
# Date
{
color = "rgb(93a1a1)";
font_family = config.custom.font.sans-serif;
font_family = config.custom.settings.fonts.sans-serif;
font_size = 32;
halign = "center";
position = "0, 100";
@ -85,7 +85,7 @@ in {
# Fingerprint
{
color = "rgb(93a1a1)";
font_family = config.custom.font.monospace;
font_family = config.custom.settings.fonts.monospace;
font_size = 42;
halign = "center";
position = "0, -100";

View file

@ -16,7 +16,7 @@ in {
shellIntegration.mode = "no-cursor"; # Disable forced beam cursor
font = {
name = config.custom.font.monospace;
name = config.custom.settings.fonts.monospace;
size = 14;
};

View file

@ -103,7 +103,7 @@ in {
fullScreen = true;
quickSplash = true;
size = "${toString (config.custom.width / 2)}x${toString (config.custom.height / 2)}";
uiFont = config.custom.font.monospace;
uiFont = config.custom.settings.fonts.monospace;
uiSize = 24;
};
};

View file

@ -32,7 +32,7 @@ in {
#?? rofi-theme-selector
theme = "custom";
font = "${config.custom.font.monospace} 16";
font = "${config.custom.settings.fonts.monospace} 16";
# https://github.com/davatorium/rofi/blob/next/CONFIG.md
extraConfig = {

View file

@ -31,7 +31,7 @@ in {
indicator-idle-visible = true;
indicator-radius = 150;
font-size = 48 * config.custom.scale;
font = config.custom.font.monospace;
font = config.custom.settings.fonts.monospace;
image = mkIf config.custom.wallpaper "/tmp/altered.png";
bs-hl-color = "93a1a1";
color = "073642";

View file

@ -138,11 +138,11 @@ in {
theme = {
style = ''
#box {
font: larger ${config.custom.font.sans-serif};
font: larger ${config.custom.settings.fonts.sans-serif};
}
placeholder {
font: larger ${config.custom.font.monospace};
font: larger ${config.custom.settings.fonts.monospace};
}
${readFile ./style.css}

View file

@ -67,7 +67,7 @@ in {
#?? GTK_DEBUG=interactive waybar
style = let
border = toString config.custom.border;
font = config.custom.font.monospace;
font = config.custom.settings.fonts.monospace;
gap = toString config.custom.gap;
in ''
* {

View file

@ -21,7 +21,7 @@ in {
local act = wezterm.action
local config = wezterm.config_builder()
config.font = wezterm.font('${config.custom.font.monospace}')
config.font = wezterm.font('${config.custom.settings.fonts.monospace}')
-- # TODO: Remove when using Wayland
config.font_size = ${toString (14 * config.custom.scale)}

View file

@ -21,7 +21,7 @@ in {
anchor = "top-center";
backgroundColor = "#073642";
borderColor = "#002b36";
font = "${config.custom.font.sans-serif} 12";
font = "${config.custom.settings.fonts.sans-serif} 12";
layer = "overlay";
margin = "20";
padding = "10";

View file

@ -25,7 +25,7 @@ in {
fill-tabs = mkBoolean true;
floating-controls = mkBoolean true;
floating-controls-hover-area = mkUint32 10;
font = mkString "${config.custom.font.monospace} 14";
font = mkString "${config.custom.settings.fonts.monospace} 14";
headerbar-drag-area = mkBoolean false;
notify-process-completion = mkBoolean false;
opacity = mkUint32 100;
@ -71,7 +71,7 @@ in {
cursor-blink = mkBoolean false;
gtk-enable-primary-paste = mkBoolean false;
color-scheme = mkString "prefer-dark";
monospace-font-name = mkString "${config.custom.font.monospace} 14";
monospace-font-name = mkString "${config.custom.settings.fonts.monospace} 14";
};
# GNOME Files

View file

@ -7,7 +7,13 @@
with lib; let
cfg = config.custom.settings.fonts;
in {
options.custom.settings.fonts.enable = mkOption {default = false;};
options.custom.settings.fonts = {
enable = mkOption {default = false;};
emoji = mkOption {default = "Noto Color Emoji";};
monospace = mkOption {default = "IosevkaTerm NFP SemiBold";};
sans-serif = mkOption {default = "Outfit";};
serif = mkOption {default = "Liberation Serif";};
};
config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Fonts
@ -52,10 +58,10 @@ in {
#?? fc-list --brief | grep family: | sort
fontconfig.defaultFonts = {
emoji = [config.custom.font.emoji];
monospace = [config.custom.font.monospace];
sansSerif = [config.custom.font.sans-serif];
serif = [config.custom.font.serif];
emoji = [cfg.emoji];
monospace = [cfg.monospace];
sansSerif = [cfg.sans-serif];
serif = [cfg.serif];
};
};

View file

@ -21,8 +21,8 @@ in {
extraCss = css;
};
font = {
name = config.custom.font.sans-serif;
font = with config.custom.settings.fonts; {
name = sans-serif;
size = 12;
};