2009-10-12 16:36:19 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-03-06 12:26:57 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
configFile = ./xfs.conf;
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
###### interface
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
options = {
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
services.xfs = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable the X Font Server.";
|
2009-03-06 12:26:57 +00:00
|
|
|
};
|
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
};
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
};
|
2009-03-06 12:26:57 +00:00
|
|
|
|
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
###### implementation
|
2009-04-30 02:29:58 +00:00
|
|
|
|
2011-03-30 17:52:34 +00:00
|
|
|
config = mkIf config.services.xfs.enable (
|
|
|
|
mkAssert config.fonts.enableFontDir "
|
|
|
|
Please enable fontDir (fonts.enableFontDir) to use xfs.
|
|
|
|
" {
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2009-10-12 18:09:34 +00:00
|
|
|
jobs.xfs =
|
2009-10-12 16:36:19 +00:00
|
|
|
{ description = "X Font Server";
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2012-03-04 12:58:18 +00:00
|
|
|
startOn = "started all-interfaces";
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
|
|
|
};
|
2009-03-06 12:26:57 +00:00
|
|
|
|
2011-03-30 17:52:34 +00:00
|
|
|
});
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2007-11-05 08:54:30 +00:00
|
|
|
}
|