From 8c9d312e21177c2853f10db29d262bab3fa26d25 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 5 Nov 2007 08:54:30 +0000 Subject: [PATCH] Added xfs; fixed nixos-checkout svn path=/nixos/trunk/; revision=9579 --- installer/nixos-checkout.sh | 2 +- system/options.nix | 9 +++++++++ upstart-jobs/default.nix | 6 ++++++ upstart-jobs/xfs.conf | 15 +++++++++++++++ upstart-jobs/xfs.nix | 20 ++++++++++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 upstart-jobs/xfs.conf create mode 100644 upstart-jobs/xfs.nix diff --git a/installer/nixos-checkout.sh b/installer/nixos-checkout.sh index c9658f66c6da..d5a393a7eb6c 100644 --- a/installer/nixos-checkout.sh +++ b/installer/nixos-checkout.sh @@ -29,7 +29,7 @@ fi svn co https://svn.cs.uu.nl:12443/repos/trace/nixos/trunk nixos svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs svn co https://svn.cs.uu.nl:12443/repos/trace/services/trunk services -ln -sf services nixos/services +ln -sfn ../services nixos/services # A few symlink. ln -sfn ../nixpkgs/pkgs nixos/pkgs diff --git a/system/options.nix b/system/options.nix index c43c91098fc5..44543996cd45 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1415,4 +1415,13 @@ root ALL=(ALL) SETENV: ALL "; } + { + name = ["services" "xfs" "enable"]; + default = false; + description = " + Whether to enable X Font Server. +"; + } + + ] diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index 2baedf3ccbbf..7ac0e5d95039 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -194,6 +194,12 @@ import ../upstart-jobs/gather.nix { inherit config pkgs; }) + # X Font Server + ++ optional ["services" "xfs" "enable"] + (import ../upstart-jobs/xfs.nix { + inherit config pkgs; + }) + ++ optional ["services" "ircdHybrid" "enable"] (import ../upstart-jobs/ircd-hybrid.nix { inherit config pkgs; diff --git a/upstart-jobs/xfs.conf b/upstart-jobs/xfs.conf new file mode 100644 index 000000000000..5352d74faa0c --- /dev/null +++ b/upstart-jobs/xfs.conf @@ -0,0 +1,15 @@ +# font server configuration file +# $Xorg: config.cpp,v 1.3 2000/08/17 19:54:19 cpqbld Exp $ + +clone-self = on +use-syslog = off +error-file = /var/log/xfs.log +# in decipoints +default-point-size = 120 +default-resolutions = 75,75,100,100 + +# font cache control, specified in KB +cache-hi-mark = 2048 +cache-low-mark = 1433 +cache-balance = 70 +catalogue = /var/run/current-system/sw/share/X11-fonts/ diff --git a/upstart-jobs/xfs.nix b/upstart-jobs/xfs.nix new file mode 100644 index 000000000000..19f7f6d4db4d --- /dev/null +++ b/upstart-jobs/xfs.nix @@ -0,0 +1,20 @@ +{ + pkgs, config +}: +let + configFile = ./xfs.conf; + startingDependency = if (config.get [ "services" "gw6c" "enable" ]) + then "gw6c" else "network-interfaces"; +in +rec { + name = "xfs"; + groups = []; + users = []; + job = " + description = \"X Font Server\" + start on ${startingDependency}/started + stop on ${startingDependency}/stop + + respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile} + "; +}