diff --git a/installer/nixos-checkout.sh b/installer/nixos-checkout.sh index c9658f66c6d..d5a393a7eb6 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 c43c91098fc..44543996cd4 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 2baedf3ccbb..7ac0e5d9503 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 00000000000..5352d74faa0 --- /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 00000000000..19f7f6d4db4 --- /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} + "; +}