nixos-config/nixos/modules/system/font.nix

75 lines
1.5 KiB
Nix
Raw Normal View History

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?
2023-06-30 17:28:17 +02:00
#fontconfig = {
# subpixel = {
# lcdfilter = "default";
# rgba = "rgb";
# };
# hinting = {
# enable = true;
# autohint = false;
# };
# enable = true;
# antialias = true;
# defaultFonts = { monospace = [ "JetBrains Mono" ]; };
#};
2019-10-24 02:20:38 +02:00
2023-06-30 20:59:11 +02:00
# fonts = with pkgs; [
# corefonts
# hasklig
# inconsolata
# source-code-pro
# symbola
# ubuntu_font_family
# # symbol fonts
# # ------------
# nerdfonts
# powerline-fonts
# font-awesome
# fira-code-symbols
# jetbrains-mono
# # shell font
# # ----------
# terminus_font
# gohufont
# ];
2019-10-24 02:20:38 +02:00
};
};
}