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 = {
|
||||
enable = mkOption {
|
||||
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/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/xfs.nix)
|
||||
|
||||
# nix
|
||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||
|
@ -149,12 +149,6 @@ let
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# X Font Server
|
||||
++ optional config.services.xfs.enable
|
||||
(import ../upstart-jobs/xfs.nix {
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
# Postfix mail server.
|
||||
++ optional config.services.postfix.enable
|
||||
(import ../upstart-jobs/postfix.nix {
|
||||
|
@ -1,20 +1,54 @@
|
||||
{
|
||||
pkgs, config
|
||||
}:
|
||||
if ! config.fonts.enableFontDir then abort "Please enable fontDir (fonts.enableFontDir) to use xfs." else
|
||||
{pkgs, config, ...}:
|
||||
|
||||
###### interface
|
||||
let
|
||||
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";
|
||||
in
|
||||
rec {
|
||||
|
||||
mkIf config.services.xfs.enable {
|
||||
require = [
|
||||
options
|
||||
];
|
||||
|
||||
services = {
|
||||
|
||||
extraJobs = [ (rec {
|
||||
name = "xfs";
|
||||
groups = [];
|
||||
users = [];
|
||||
job = "
|
||||
description \"X Font Server\"
|
||||
job = ''
|
||||
description "X Font Server"
|
||||
start on ${startingDependency}/started
|
||||
stop on shutdown
|
||||
|
||||
respawn ${pkgs.xorg.xfs}/bin/xfs -config ${configFile}
|
||||
";
|
||||
'';
|
||||
})];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user