From eddd3a7e11629b5d4190a66b22b336fb9a6a652a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 22 Jan 2007 16:05:37 +0000 Subject: [PATCH] * Provide a few fonts in a purely functional way, i.e., as part of the system configuration. svn path=/nixos/trunk/; revision=7748 --- system/etc.nix | 29 ++++++++++++++++++++--------- system/etc/fonts/fonts.conf | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/system/etc.nix b/system/etc.nix index 5f5d1e8da59b..fd64411163b4 100644 --- a/system/etc.nix +++ b/system/etc.nix @@ -81,15 +81,26 @@ import ../helpers/make-etc.nix { # (X11) client-rendered fonts. source = pkgs.substituteAll { src = ./etc/fonts/fonts.conf; - fontDirectories = map (dir: "${dir}") - [ # Search for fonts in... - # - the user's .fonts directory - "~/.fonts" - # - the user's current profile - "~/.nix-profile/lib/X11/fonts" - # - the default profile - "/nix/var/nix/profiles/default/lib/X11/fonts" - ]; + fontDirectories = + let + # Search for fonts in... + runtimeDirs = [ + # - the user's .fonts directory + "~/.fonts" + # - the user's current profile + "~/.nix-profile/lib/X11/fonts" + # - the default profile + "/nix/var/nix/profiles/default/lib/X11/fonts" + ]; + systemFonts = [ + # - a few statically built locations + pkgs.xorg.fontbhttf + pkgs.xorg.fontbh100dpi + pkgs.xorg.fontbhlucidatypewriter100dpi + pkgs.freefont_ttf + ]; + in + map (dir: "${dir}") (runtimeDirs ++ systemFonts); }; target = "fonts/fonts.conf"; } diff --git a/system/etc/fonts/fonts.conf b/system/etc/fonts/fonts.conf index 012a3008a57e..70d886e08cd5 100644 --- a/system/etc/fonts/fonts.conf +++ b/system/etc/fonts/fonts.conf @@ -4,5 +4,5 @@ @fontDirectories@ - +