Convert "xfs", problems when enabling warning!
svn path=/nixos/branches/fix-style/; revision=14388
This commit is contained in:
parent
030a30b4b6
commit
aa78690465
|
@ -479,18 +479,6 @@ in
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xfs = {
|
|
||||||
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "
|
|
||||||
Whether to enable the X Font Server.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
mysql = {
|
mysql = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -901,6 +889,7 @@ in
|
||||||
(import ../upstart-jobs/udev.nix) # The udev daemon creates devices nodes and runs programs when hardware events occur.
|
(import ../upstart-jobs/udev.nix) # The udev daemon creates devices nodes and runs programs when hardware events occur.
|
||||||
(import ../upstart-jobs/samba.nix) # TODO: doesn't start here (?)
|
(import ../upstart-jobs/samba.nix) # TODO: doesn't start here (?)
|
||||||
(import ../upstart-jobs/ircd-hybrid.nix) # TODO: doesn't compile on x86_64-linux, can't test
|
(import ../upstart-jobs/ircd-hybrid.nix) # TODO: doesn't compile on x86_64-linux, can't test
|
||||||
|
(import ../upstart-jobs/xfs.nix)
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||||
|
|
|
@ -149,12 +149,6 @@ let
|
||||||
inherit config pkgs;
|
inherit config pkgs;
|
||||||
})
|
})
|
||||||
|
|
||||||
# X Font Server
|
|
||||||
++ optional config.services.xfs.enable
|
|
||||||
(import ../upstart-jobs/xfs.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Postfix mail server.
|
# Postfix mail server.
|
||||||
++ optional config.services.postfix.enable
|
++ optional config.services.postfix.enable
|
||||||
(import ../upstart-jobs/postfix.nix {
|
(import ../upstart-jobs/postfix.nix {
|
||||||
|
|
|
@ -1,20 +1,54 @@
|
||||||
{
|
{pkgs, config, ...}:
|
||||||
pkgs, config
|
|
||||||
}:
|
###### interface
|
||||||
if ! config.fonts.enableFontDir then abort "Please enable fontDir (fonts.enableFontDir) to use xfs." else
|
|
||||||
let
|
let
|
||||||
configFile = ./xfs.conf;
|
inherit (pkgs.lib) mkOption mkIf;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services = {
|
||||||
|
xfs = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether to enable the X Font Server.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: enable this warning again. It's causing "infinite recursion encountered, why?"
|
||||||
|
# if ! config.fonts.enableFontDir then throw "Please enable fontDir (fonts.enableFontDir) to use xfs." else
|
||||||
|
|
||||||
|
let
|
||||||
|
configFile = ./xfs.conf;
|
||||||
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
|
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
|
||||||
in
|
in
|
||||||
rec {
|
|
||||||
name = "xfs";
|
|
||||||
groups = [];
|
|
||||||
users = [];
|
|
||||||
job = "
|
|
||||||
description \"X Font Server\"
|
|
||||||
start on ${startingDependency}/started
|
|
||||||
stop on shutdown
|
|
||||||
|
|
||||||
respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile}
|
mkIf config.services.xfs.enable {
|
||||||
";
|
require = [
|
||||||
|
options
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
|
||||||
|
extraJobs = [ (rec {
|
||||||
|
name = "xfs";
|
||||||
|
groups = [];
|
||||||
|
users = [];
|
||||||
|
job = ''
|
||||||
|
description "X Font Server"
|
||||||
|
start on ${startingDependency}/started
|
||||||
|
stop on shutdown
|
||||||
|
|
||||||
|
respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile}
|
||||||
|
'';
|
||||||
|
})];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue