diff --git a/system/fontdir.nix b/system/fontdir.nix index 846bfd5388dd..ee5f965034d3 100644 --- a/system/fontdir.nix +++ b/system/fontdir.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation fontDirs=\"\$fontDirs \$(dirname \$i)\"; done; mkdir -p \$out/share/X11-fonts/; - for i in \$(find \$fontDirs -type f); do + for i in \$(find \$fontDirs -type f -o -type l); do j=\${i##*/} if ! test -e \$out/share/X11-fonts/\${j}; then ln -s \$i \$out/share/X11-fonts/\${j}; @@ -29,6 +29,7 @@ stdenv.mkDerivation cd \$out/share/X11-fonts/ rm fonts.dir rm fonts.scale + rm fonts.alias mkfontdir mkfontscale cat \$( find \$fontalias/ -name fonts.alias) >fonts.alias diff --git a/system/options.nix b/system/options.nix index 5ade1e818057..3b5353d0807f 100644 --- a/system/options.nix +++ b/system/options.nix @@ -860,6 +860,14 @@ Default colour depth. "; }; + + useXFS = mkOption { + default = false; + example = "unix/:7100"; + description = " + Way to access the X Font Server to use. + "; + }; }; diff --git a/upstart-jobs/apache-httpd/default.nix b/upstart-jobs/apache-httpd/default.nix index 2dc6f11b6515..937f7ce18172 100644 --- a/upstart-jobs/apache-httpd/default.nix +++ b/upstart-jobs/apache-httpd/default.nix @@ -222,7 +222,7 @@ in description "Apache HTTPD" start on ${startingDependency}/started - stop on ${startingDependency}/stop + stop on shutdown respawn ${httpd}/bin/httpd -f ${httpdConf} -DNO_DETACH ''; diff --git a/upstart-jobs/xfs.nix b/upstart-jobs/xfs.nix index 59468c30f4d6..20975622ccc0 100644 --- a/upstart-jobs/xfs.nix +++ b/upstart-jobs/xfs.nix @@ -12,7 +12,7 @@ rec { job = " description = \"X Font Server\" start on ${startingDependency}/started - stop on ${startingDependency}/stop + stop on shutdown respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile} "; diff --git a/upstart-jobs/xserver.conf b/upstart-jobs/xserver.conf index 80d265ff5b4b..14fe98b13a02 100644 --- a/upstart-jobs/xserver.conf +++ b/upstart-jobs/xserver.conf @@ -1,5 +1,6 @@ Section "Files" # Font directories. + @xfs@ @fontPaths@ # Module (driver) directories. diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 42d8280e067a..06bf572df995 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -116,6 +116,9 @@ let serverLayoutOptions = cfg.serverLayoutOptions; defaultDepth = cfg.defaultDepth; + xfs = (if cfg.useXFS == false then "" else + "FontPath \"${toString cfg.useXFS}\""); + buildCommand = " buildCommand= # urgh, don't substitute this