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";}; 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_padding = 10;
bar_precedence_over_border = true; # Render borders around hyprbars bar_precedence_over_border = true; # Render borders around hyprbars
bar_text_align = "left"; bar_text_align = "left";
bar_text_font = config.custom.font.monospace; bar_text_font = config.custom.settings.fonts.monospace;
bar_text_size = 11; bar_text_size = 11;
#// bar_title_enabled = false; #// bar_title_enabled = false;
"col.text" = "rgb(93a1a1)"; "col.text" = "rgb(93a1a1)";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -103,7 +103,7 @@ in {
fullScreen = true; fullScreen = true;
quickSplash = true; quickSplash = true;
size = "${toString (config.custom.width / 2)}x${toString (config.custom.height / 2)}"; 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; uiSize = 24;
}; };
}; };

View file

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

View file

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

View file

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

View file

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

View file

@ -21,7 +21,7 @@ in {
local act = wezterm.action local act = wezterm.action
local config = wezterm.config_builder() 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 -- # TODO: Remove when using Wayland
config.font_size = ${toString (14 * config.custom.scale)} config.font_size = ${toString (14 * config.custom.scale)}

View file

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

View file

@ -25,7 +25,7 @@ in {
fill-tabs = mkBoolean true; fill-tabs = mkBoolean true;
floating-controls = mkBoolean true; floating-controls = mkBoolean true;
floating-controls-hover-area = mkUint32 10; 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; headerbar-drag-area = mkBoolean false;
notify-process-completion = mkBoolean false; notify-process-completion = mkBoolean false;
opacity = mkUint32 100; opacity = mkUint32 100;
@ -71,7 +71,7 @@ in {
cursor-blink = mkBoolean false; cursor-blink = mkBoolean false;
gtk-enable-primary-paste = mkBoolean false; gtk-enable-primary-paste = mkBoolean false;
color-scheme = mkString "prefer-dark"; 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 # GNOME Files

View file

@ -7,7 +7,13 @@
with lib; let with lib; let
cfg = config.custom.settings.fonts; cfg = config.custom.settings.fonts;
in { 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 { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Fonts # https://wiki.nixos.org/wiki/Fonts
@ -52,10 +58,10 @@ in {
#?? fc-list --brief | grep family: | sort #?? fc-list --brief | grep family: | sort
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
emoji = [config.custom.font.emoji]; emoji = [cfg.emoji];
monospace = [config.custom.font.monospace]; monospace = [cfg.monospace];
sansSerif = [config.custom.font.sans-serif]; sansSerif = [cfg.sans-serif];
serif = [config.custom.font.serif]; serif = [cfg.serif];
}; };
}; };

View file

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