mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 19:46:20 +00:00
41 lines
909 B
Nix
41 lines
909 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.fonts.open-dyslexic;
|
|
in
|
|
{
|
|
options.fonts.open-dyslexic = {
|
|
enable = mkEnableOption "Enable the OpenDyslexic font";
|
|
default = mkOption {
|
|
type = types.bool;
|
|
description = "Make Noto Sans the default sans-serif font";
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
fonts = {
|
|
packages =
|
|
with pkgs;
|
|
[
|
|
open-dyslexic
|
|
]
|
|
++ (if (config.fonts.nerd-fonts.enable) then [ nerd-fonts.open-dyslexic ] else [ ]);
|
|
fontconfig.defaultFonts = {
|
|
sansSerif = mkIf cfg.default [
|
|
(if (config.fonts.nerd-fonts.enable) then "OpenDyslexic Nerd Font" else "OpenDyslexic")
|
|
];
|
|
monospace = mkIf cfg.default [
|
|
(if (config.fonts.nerd-fonts.enable) then "OpenDyslexicM Nerd Font" else "OpenDyslexicM")
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|