2024-11-19 10:31:29 +01:00
|
|
|
{
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-03-21 15:00:36 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.metacfg;
|
2024-11-19 10:31:29 +01:00
|
|
|
let
|
|
|
|
cfg = config.metacfg.system.fonts;
|
2024-03-21 15:00:36 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.metacfg.system.fonts = with types; {
|
|
|
|
enable = mkBoolOpt false "Whether or not to manage fonts.";
|
|
|
|
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.variables = {
|
|
|
|
# Enable icons in tooling since we have nerdfonts.
|
|
|
|
LOG_ICONS = "true";
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts = {
|
2024-11-19 10:31:29 +01:00
|
|
|
packages =
|
|
|
|
with pkgs;
|
2024-03-21 15:00:36 +01:00
|
|
|
[
|
2024-11-25 12:42:21 +01:00
|
|
|
(nerdfonts.override {
|
|
|
|
fonts = [
|
|
|
|
"Hack"
|
|
|
|
"FiraCode"
|
|
|
|
"DroidSansMono"
|
|
|
|
"JetBrainsMono"
|
|
|
|
];
|
|
|
|
})
|
2024-11-19 10:31:29 +01:00
|
|
|
]
|
|
|
|
++ cfg.fonts;
|
2024-03-21 15:00:36 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|