From 6db2c1814e0f23c6eaa936fd39a014b9df7e20d2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 22 Jan 2007 15:00:18 +0000 Subject: [PATCH] * Generate the list of fonts in a Nix expression. svn path=/nixos/trunk/; revision=7744 --- system/etc.nix | 13 ++++++++++++- system/etc/fonts/fonts.conf | 4 +--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/system/etc.nix b/system/etc.nix index 917491fcb1d..5f5d1e8da59 100644 --- a/system/etc.nix +++ b/system/etc.nix @@ -79,7 +79,18 @@ import ../helpers/make-etc.nix { { # Configuration file for fontconfig used to locate # (X11) client-rendered fonts. - source = ./etc/fonts/fonts.conf; + 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" + ]; + }; target = "fonts/fonts.conf"; } diff --git a/system/etc/fonts/fonts.conf b/system/etc/fonts/fonts.conf index ff4a608e928..012a3008a57 100644 --- a/system/etc/fonts/fonts.conf +++ b/system/etc/fonts/fonts.conf @@ -3,8 +3,6 @@ - /nix/var/nix/profiles/default/lib/X11/fonts - ~/.nix-profile/lib/X11/fonts - ~/.fonts + @fontDirectories@