2009-10-12 20:36:19 +04:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-03-06 15:26:57 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
configFile = ./xfs.conf;
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
###### interface
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
options = {
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
services.xfs = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
2013-10-30 20:37:45 +04:00
|
|
|
type = types.bool;
|
2009-10-12 20:36:19 +04:00
|
|
|
default = false;
|
|
|
|
description = "Whether to enable the X Font Server.";
|
2009-03-06 15:26:57 +03:00
|
|
|
};
|
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
};
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
};
|
2009-03-06 15:26:57 +03:00
|
|
|
|
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
###### implementation
|
2009-04-30 06:29:58 +04:00
|
|
|
|
2013-10-30 20:37:45 +04:00
|
|
|
config = mkIf config.services.xfs.enable {
|
|
|
|
|
|
|
|
assertions = singleton
|
|
|
|
{ assertion = config.fonts.enableFontDir;
|
|
|
|
message = "Please enable fonts.enableFontDir to use the X Font Server.";
|
|
|
|
};
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2009-10-12 22:09:34 +04:00
|
|
|
jobs.xfs =
|
2009-10-12 20:36:19 +04:00
|
|
|
{ description = "X Font Server";
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2012-03-04 22:44:42 +04:00
|
|
|
startOn = "started networking";
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2009-10-12 20:36:19 +04:00
|
|
|
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
|
|
|
};
|
2009-03-06 15:26:57 +03:00
|
|
|
|
2013-10-30 20:37:45 +04:00
|
|
|
};
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2007-11-05 11:54:30 +03:00
|
|
|
}
|