Move font confit to flake.nix, add to stylix

Change fonts to all use Fira family, Fira Sans for UI Fira Sans Mono for
monospace and FiraCode still for Emacs
This commit is contained in:
Evie Litherland-Smith 2023-10-07 10:19:56 +01:00
parent f2eadee91e
commit e94a4dde31
9 changed files with 59 additions and 38 deletions

View file

@ -118,9 +118,57 @@
image = ./wallpapers/waves/cat-waves.png; image = ./wallpapers/waves/cat-waves.png;
base16Scheme = base16Scheme =
"${inputs.catppuccin-base16}/base16/macchiato.yaml"; "${inputs.catppuccin-base16}/base16/macchiato.yaml";
fonts = {
emoji = {
name = "Noto Color Emoji";
package = pkgs.noto-fonts-emoji;
};
monospace = {
name = "Fira Sans Mono";
package = pkgs.fira-mono;
};
sansSerif = {
name = "Fira Sans";
package = pkgs.fira;
};
serif = {
name = "Fira Sans";
package = pkgs.fira;
};
};
homeManagerIntegration.followSystem = true;
targets = { targets = {
chromium.enable = true;
console.enable = true; console.enable = true;
grub.enable = true; grub = {
enable = true;
useImage = true;
};
};
};
fonts = {
packages = with pkgs; [
fira
fira-mono
fira-code
(nerdfonts.override { fonts = [ "FiraCode" ]; })
dejavu_fonts
noto-fonts-emoji
font-awesome
material-symbols
emacs-all-the-icons-fonts
material-design-icons
weather-icons
vscode-extensions.file-icons.file-icons
];
fontconfig = {
enable = true;
defaultFonts = {
serif = [ "Fira Sans" "DejaVu Sans" ];
sansSerif = [ "Fira Sans" "DejaVu Sans" ];
monospace = [ "Fira Mono" "DejaVu Sans Mono" ];
emoji = [ "Noto Color Emoji" ];
};
}; };
}; };
nix = { nix = {

View file

@ -26,7 +26,7 @@
extraCss = '' extraCss = ''
* { * {
all: unset; all: unset;
font-family: FiraCode Nerd Font; font-family: "Fira Sans";
font-size: 1.3rem; font-size: 1.3rem;
} }

View file

@ -1,9 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = [ home.packages = [ pkgs.swaynotificationcenter ];
pkgs.swaynotificationcenter
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
];
xdg.configFile."swaync/style.css".source = ./style.css; xdg.configFile."swaync/style.css".source = ./style.css;
} }

View file

@ -1,7 +1,7 @@
* { * {
all: unset; all: unset;
font-size: 14px; font-size: 14px;
font-family: "FiraCode Nerd Font"; font-family: "Fira Sans";
transition: 200ms; transition: 200ms;
} }

View file

@ -35,7 +35,7 @@
margin: 0px; margin: 0px;
background: transparent; background: transparent;
color: @text; color: @text;
font-family: "FiraCode Nerd Font"; font-family: "Fira Sans";
font-size: 18px; font-size: 18px;
} }

View file

@ -32,7 +32,7 @@
* { * {
border: none; border: none;
border-radius: 10px; border-radius: 10px;
font-family: "FiraCode Nerd Font"; font-family: "Fira Sans";
font-size: 18px; font-size: 18px;
} }

View file

@ -28,6 +28,10 @@
rebootIcon = ./icons/reboot.png; rebootIcon = ./icons/reboot.png;
logoutIcon = ./icons/logout.png; logoutIcon = ./icons/logout.png;
in '' in ''
* {
font-family: "Fira Sans";
}
window { window {
background: transparent; background: transparent;
} }

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
stylix.targets.tmux.enable = true;
programs.tmux = { programs.tmux = {
enable = true; enable = true;
baseIndex = 1; baseIndex = 1;

View file

@ -32,35 +32,6 @@
tumbler.enable = true; tumbler.enable = true;
xserver.displayManager.defaultSession = "hyprland"; xserver.displayManager.defaultSession = "hyprland";
}; };
fonts = {
packages = with pkgs; [
# normal fonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
font-awesome
# nerdfonts
(nerdfonts.override { fonts = [ "FiraCode" ]; })
# icon fonts
material-symbols
emacs-all-the-icons-fonts
material-design-icons
weather-icons
vscode-extensions.file-icons.file-icons
];
fontconfig = {
enable = true;
# user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
defaultFonts = {
serif = [ "Noto Serif" "Noto Color Emoji" ];
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
monospace = [ "FiraCode Nerd Font" "Noto Sans" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];