2009-10-12 18:36:19 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2009-03-06 13:26:57 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
configFile = ./xfs.conf;
|
|
|
|
|
|
|
|
startingDependency =
|
|
|
|
if config.services.gw6c.enable && config.services.gw6c.autorun
|
|
|
|
then "gw6c"
|
|
|
|
else "network-interfaces";
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2009-03-06 13:26:57 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
###### interface
|
2009-03-06 13:26:57 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xfs = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable the X Font Server.";
|
2009-03-06 13:26:57 +01:00
|
|
|
};
|
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
};
|
2009-03-06 13:26:57 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
};
|
2009-03-06 13:26:57 +01:00
|
|
|
|
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
###### implementation
|
2009-04-30 04:29:58 +02:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
config = mkIf config.services.xfs.enable {
|
2009-04-30 04:29:58 +02:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
assertions = singleton
|
|
|
|
{ assertion = config.fonts.enableFontDir;
|
|
|
|
message = "Please enable fontDir (fonts.enableFontDir) to use xfs.";
|
|
|
|
};
|
2009-03-06 13:26:57 +01:00
|
|
|
|
2009-10-12 20:09:34 +02:00
|
|
|
jobs.xfs =
|
2009-10-12 18:36:19 +02:00
|
|
|
{ description = "X Font Server";
|
|
|
|
|
2009-11-06 23:19:17 +01:00
|
|
|
startOn = "started ${startingDependency}";
|
2009-03-06 13:26:57 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
|
|
|
};
|
2009-03-06 13:26:57 +01:00
|
|
|
|
|
|
|
};
|
2009-10-12 18:36:19 +02:00
|
|
|
|
2007-11-05 09:54:30 +01:00
|
|
|
}
|