mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-14 20:33:59 +01:00
Abstract stylix and fonts into modules
This commit is contained in:
parent
a17ba29926
commit
19dda06920
@ -5,6 +5,8 @@
|
||||
./laptop.nix
|
||||
./modules/starship.nix
|
||||
./modules/fish.nix
|
||||
./modules/fonts.nix
|
||||
./modules/stylix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@ -45,39 +47,6 @@
|
||||
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 = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
@ -199,28 +168,6 @@
|
||||
(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.fcitx5.addons = [ pkgs.fcitx5-mozc ];
|
||||
|
||||
|
25
modules/fonts.nix
Normal file
25
modules/fonts.nix
Normal 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"; };
|
||||
};
|
||||
};
|
||||
}
|
36
modules/stylix/default.nix
Normal file
36
modules/stylix/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Loading…
Reference in New Issue
Block a user