2019-10-24 02:20:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.system.custom.fonts;
|
2021-11-01 09:20:42 +01:00
|
|
|
in
|
|
|
|
{
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
options.system.custom.fonts = {
|
|
|
|
enable = mkEnableOption "enable fonts";
|
2023-02-16 13:52:15 +01:00
|
|
|
size = mkOption {
|
2019-12-20 05:54:26 +01:00
|
|
|
type = types.int;
|
2023-02-16 13:52:15 +01:00
|
|
|
default = 17;
|
2019-10-24 02:20:38 +02:00
|
|
|
description = ''
|
2023-02-16 13:52:15 +01:00
|
|
|
size of the font
|
2019-10-24 02:20:38 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-06-10 13:28:54 +02:00
|
|
|
# You can put your private ttf fonts into
|
|
|
|
# in $XDG_DATA_HOME/fonts, which for most users will resolve to ~/.local/share/fonts
|
|
|
|
# see https://nixos.wiki/wiki/Fonts
|
2019-10-24 02:20:38 +02:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
2023-02-16 13:52:15 +01:00
|
|
|
# only set this on x220 to 141, if resolution is shit.
|
|
|
|
#services.xserver.dpi = cfg.dpi;
|
2022-01-13 13:40:18 +01:00
|
|
|
|
2019-10-24 02:20:38 +02:00
|
|
|
fonts = {
|
|
|
|
|
2021-07-08 20:43:14 +02:00
|
|
|
enableDefaultFonts = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
enableGhostscriptFonts = true;
|
2021-07-08 20:43:14 +02:00
|
|
|
fontDir.enable = true;
|
2019-10-24 02:20:38 +02:00
|
|
|
|
2023-02-16 13:52:15 +01:00
|
|
|
# todo brauch ich überhaupt die urxvt und xterm configurationen?
|
2019-10-24 02:20:38 +02:00
|
|
|
fontconfig = {
|
|
|
|
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;
|
2023-02-16 13:52:15 +01:00
|
|
|
defaultFonts = { monospace = [ "JetBrains Mono" ]; };
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
fonts = with pkgs; [
|
|
|
|
|
|
|
|
corefonts
|
|
|
|
hasklig
|
|
|
|
inconsolata
|
|
|
|
source-code-pro
|
|
|
|
symbola
|
|
|
|
ubuntu_font_family
|
|
|
|
|
|
|
|
# symbol fonts
|
|
|
|
# ------------
|
2021-07-08 20:43:14 +02:00
|
|
|
# nerdfonts
|
2019-10-24 02:20:38 +02:00
|
|
|
powerline-fonts
|
2022-06-14 22:56:58 +02:00
|
|
|
font-awesome
|
2019-10-24 02:20:38 +02:00
|
|
|
fira-code-symbols
|
2023-02-16 13:52:15 +01:00
|
|
|
jetbrains-mono
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
# shell font
|
|
|
|
# ----------
|
|
|
|
terminus_font
|
|
|
|
gohufont
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|