diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix index f913b8c33e56..af3d93fc1bc4 100644 --- a/nixos/modules/config/fonts/fonts.nix +++ b/nixos/modules/config/fonts/fonts.nix @@ -11,17 +11,27 @@ with lib; # 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 = + fonts.fonts = mkIf config.fonts.enableDefaultFonts [ pkgs.xorg.fontbhlucidatypewriter100dpi pkgs.xorg.fontbhlucidatypewriter75dpi diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index b03f70385b1f..6c6a1e79ed0e 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -654,6 +654,8 @@ in ${xrandrMonitorSections} ''; + fonts.enableDefaultFonts = mkDefault true; + }; }