fonts.nix: remove fonts from options

This commit is contained in:
Charlie Root 2024-08-16 10:10:25 +02:00
commit 6de9934ffe
4 changed files with 40 additions and 2 deletions

View file

@ -0,0 +1,15 @@
{
config,
lib,
...
}: let
inherit (lib) mkOption;
inherit (lib.types) nullOr package listOf;
in {
options.modules.system.fonts = {
# This defines extra fonts to be installed on the system.
extraFonts = mkOption {
type = nullOr (listOf package);
};
};
}

View file

@ -1,11 +1,10 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkOption mkEnableOption;
inherit (lib.types) str package submodule;
inherit (lib.types) str package;
in {
options.modules.usrEnv.style.gtk = {
enable = mkEnableOption "Wether to enable GTK theming";

View file

@ -5,5 +5,6 @@ _: {
./qt.nix
./gtk.nix
./module.nix
./fonts.nix
];
}

23
modules/style/fonts.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.types) optional;
inherit (config.modules.system.fonts) extraFonts;
in {
# A (somewhat) sane list of default fonts to be installed.
fonts.packages = with pkgs;
[
material-design-icons
papirus-icon-theme
(nerdfonts.override {fonts = ["ComicShannsMono"];}) # ComicShanns my beloved
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
corefonts
]
++ optional (extraFonts != null) extraFonts;
}