aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/config/fonts/fonts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/config/fonts/fonts.nix')
-rw-r--r--nixpkgs/nixos/modules/config/fonts/fonts.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/config/fonts/fonts.nix b/nixpkgs/nixos/modules/config/fonts/fonts.nix
new file mode 100644
index 00000000000..abb806b601a
--- /dev/null
+++ b/nixpkgs/nixos/modules/config/fonts/fonts.nix
@@ -0,0 +1,51 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+ options = {
+
+ fonts = {
+
+ # TODO: find another name for it.
+ fonts = mkOption {
+ type = types.listOf types.path;
+ default = [];
+ example = literalExample "[ pkgs.dejavu_fonts ]";
+ description = "List of primary font paths.";
+ };
+
+ enableDefaultFonts = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Enable a basic set of fonts providing several font styles
+ and families and reasonable coverage of Unicode.
+ '';
+ };
+
+ };
+
+ };
+
+ config = {
+
+ fonts.fonts = mkIf config.fonts.enableDefaultFonts
+ [
+ pkgs.xorg.fontbhlucidatypewriter100dpi
+ pkgs.xorg.fontbhlucidatypewriter75dpi
+ pkgs.dejavu_fonts
+ pkgs.freefont_ttf
+ pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
+ pkgs.liberation_ttf
+ pkgs.xorg.fontbh100dpi
+ pkgs.xorg.fontmiscmisc
+ pkgs.xorg.fontcursormisc
+ pkgs.unifont
+ pkgs.noto-fonts-emoji
+ ];
+
+ };
+
+}