1
0
forked from extern/nix-config

Abstract stylix and fonts into modules

This commit is contained in:
Donovan Glover 2023-05-16 14:48:49 -04:00
parent a17ba29926
commit 19dda06920
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 63 additions and 55 deletions

View File

@ -5,6 +5,8 @@
./laptop.nix ./laptop.nix
./modules/starship.nix ./modules/starship.nix
./modules/fish.nix ./modules/fish.nix
./modules/fonts.nix
./modules/stylix
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -45,39 +47,6 @@
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
}; };
stylix.image = ./wallpaper.png;
stylix.polarity = "dark";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml";
stylix.fonts = {
serif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
sansSerif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
monospace = {
package = pkgs.maple-mono-NF;
name = "MapleMono-NF";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 11;
desktop = 11;
popups = 11;
terminal = 11;
};
};
environment.sessionVariables = { environment.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
@ -199,28 +168,6 @@
(pkgs.callPackage ./pkgs/srb2.nix {}) (pkgs.callPackage ./pkgs/srb2.nix {})
]; ];
fonts.enableDefaultFonts = true;
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
maple-mono
maple-mono-NF
font-awesome
];
fonts.fontconfig = {
defaultFonts = {
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
monospace = [ "Noto Mono CJK JP" "Noto Mono" ];
};
};
fonts.fontconfig.hinting.style = "hintfull";
fonts.fontconfig.allowBitmaps = false;
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ]; i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ];

25
modules/fonts.nix Normal file
View File

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
maple-mono
maple-mono-NF
font-awesome
];
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
monospace = [ "Noto Mono CJK JP" "Noto Mono" ];
};
allowBitmaps = false;
hinting = { style = "hintfull"; };
};
};
}

View File

@ -0,0 +1,36 @@
{ pkgs, ... }:
{
stylix.image = ./wallpaper.png;
stylix.polarity = "dark";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml";
stylix.fonts = {
serif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
sansSerif = {
package = pkgs.noto-fonts-cjk-sans;
name = "Noto Sans CJK JP";
};
monospace = {
package = pkgs.maple-mono-NF;
name = "MapleMono-NF";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 11;
desktop = 11;
popups = 11;
terminal = 11;
};
};
}

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB