diff options
Diffstat (limited to 'nixos/modules/config/fonts/fonts.nix')
-rw-r--r-- | nixos/modules/config/fonts/fonts.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix new file mode 100644 index 000000000000..f43784f6d03e --- /dev/null +++ b/nixos/modules/config/fonts/fonts.nix @@ -0,0 +1,49 @@ +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + options = { + + fonts = { + + # TODO: find another name for it. + fonts = mkOption { + default = [ + # - the user's .fonts directory + "~/.fonts" + # - the user's current profile + "~/.nix-profile/lib/X11/fonts" + "~/.nix-profile/share/fonts" + # - the default profile + "/nix/var/nix/profiles/default/lib/X11/fonts" + "/nix/var/nix/profiles/default/share/fonts" + ]; + description = "List of primary font paths."; + apply = list: list ++ [ + # - a few statically built locations + pkgs.xorg.fontbhttf + pkgs.xorg.fontbhlucidatypewriter100dpi + pkgs.xorg.fontbhlucidatypewriter75dpi + pkgs.ttf_bitstream_vera + pkgs.freefont_ttf + pkgs.liberation_ttf + pkgs.xorg.fontbh100dpi + pkgs.xorg.fontmiscmisc + pkgs.xorg.fontcursormisc + ] + ++ config.fonts.extraFonts; + }; + + extraFonts = mkOption { + default = []; + example = [ pkgs.dejavu_fonts ]; + description = "List of packages with additional fonts."; + }; + + }; + + }; + +} |