mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 14:09:51 -07:00
refactor: modularize theming
This commit is contained in:
parent
ddfcbd78c8
commit
4c72a5cb8b
5 changed files with 102 additions and 53 deletions
|
@ -1,19 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
# fontconfig = {
|
||||
# defaultFonts = {
|
||||
# serif = [ "Noto Serif" ];
|
||||
# sansSerif = [ "Noto Sans" ];
|
||||
# };
|
||||
# };
|
||||
packages = with pkgs; [
|
||||
# noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
# noto-fonts-emoji
|
||||
# (nerdfonts.override { fonts = [ "CascadiaCode" ]; })
|
||||
(google-fonts.override { fonts = [ "Lora" ]; })
|
||||
];
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.system.fonts;
|
||||
in
|
||||
{
|
||||
options.liminalOS.system.fonts = {
|
||||
enable = lib.mkEnableOption "fonts";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
noto-fonts-cjk-sans
|
||||
(google-fonts.override { fonts = [ "Lora" ]; })
|
||||
]
|
||||
++ (lib.optionals (!config.liminalOS.theming.enable) [
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.caskaydia-cove
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue