2019-10-24 02:20:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.system.custom.fonts;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
options.system.custom.fonts = {
|
|
|
|
enable = mkEnableOption "enable fonts";
|
|
|
|
dpi = mkOption {
|
2019-12-20 05:54:26 +01:00
|
|
|
type = types.int;
|
|
|
|
default = 141;
|
2019-10-24 02:20:38 +02:00
|
|
|
description = ''
|
|
|
|
dpi of the monitor
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
enableCoreFonts = true;
|
|
|
|
enableFontDir = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
enableGhostscriptFonts = true;
|
|
|
|
|
|
|
|
fontconfig = {
|
2019-12-20 05:54:26 +01:00
|
|
|
dpi = cfg.dpi;
|
2019-10-24 02:20:38 +02:00
|
|
|
subpixel = {
|
|
|
|
lcdfilter = "default";
|
2019-12-20 05:54:26 +01:00
|
|
|
rgba = "rgb";
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
hinting = {
|
2019-12-20 05:54:26 +01:00
|
|
|
enable = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
autohint = false;
|
|
|
|
};
|
2019-12-20 05:54:26 +01:00
|
|
|
enable = true;
|
|
|
|
antialias = true;
|
|
|
|
defaultFonts = { monospace = [ "inconsolata" ]; };
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
fonts = with pkgs; [
|
|
|
|
|
|
|
|
corefonts
|
|
|
|
hasklig
|
|
|
|
inconsolata
|
|
|
|
source-code-pro
|
|
|
|
symbola
|
|
|
|
ubuntu_font_family
|
|
|
|
|
|
|
|
# symbol fonts
|
|
|
|
# ------------
|
2019-12-20 05:46:12 +01:00
|
|
|
#nerdfonts
|
2019-10-24 02:20:38 +02:00
|
|
|
powerline-fonts
|
|
|
|
font-awesome-ttf
|
|
|
|
fira-code-symbols
|
|
|
|
|
|
|
|
# shell font
|
|
|
|
# ----------
|
|
|
|
terminus_font
|
|
|
|
gohufont
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|