Implemented an option to enable to DisnixWebService on Apache Tomcat
svn path=/nixos/trunk/; revision=24560
This commit is contained in:
parent
edb5870deb
commit
9359ebf975
@ -7,6 +7,13 @@ let
|
|||||||
|
|
||||||
cfg = config.services.disnix;
|
cfg = config.services.disnix;
|
||||||
|
|
||||||
|
disnix_activation_scripts = pkgs.disnix_activation_scripts.override (origArgs: {
|
||||||
|
enableApacheWebApplication = config.services.httpd.enable;
|
||||||
|
enableAxis2WebService = config.services.tomcat.axis2.enable;
|
||||||
|
enableEjabberdDump = config.services.ejabberd.enable;
|
||||||
|
enableMySQLDatabase = config.services.mysql.enable;
|
||||||
|
enableTomcatWebApplication = config.services.tomcat.enable;
|
||||||
|
});
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -22,6 +29,11 @@ in
|
|||||||
description = "Whether to enable Disnix";
|
description = "Whether to enable Disnix";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useWebServiceInterface = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -36,6 +48,13 @@ in
|
|||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
services.dbus.packages = [ pkgs.disnix ];
|
services.dbus.packages = [ pkgs.disnix ];
|
||||||
|
|
||||||
|
services.tomcat.enable = cfg.useWebServiceInterface;
|
||||||
|
services.tomcat.javaOpts = "${optionalString cfg.useWebServiceInterface "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"} ";
|
||||||
|
services.tomcat.sharedLibs = []
|
||||||
|
++ optional cfg.useWebServiceInterface "${pkgs.DisnixWebService}/share/java/DisnixConnection.jar"
|
||||||
|
++ optional cfg.useWebServiceInterface "${pkgs.dbus_java}/share/java/dbus.jar";
|
||||||
|
services.tomcat.webapps = [] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
|
||||||
|
|
||||||
users.extraGroups = singleton
|
users.extraGroups = singleton
|
||||||
{ name = "disnix";
|
{ name = "disnix";
|
||||||
gid = config.ids.gids.disnix;
|
gid = config.ids.gids.disnix;
|
||||||
@ -48,10 +67,7 @@ in
|
|||||||
|
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
export PATH=/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin
|
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts
|
||||||
export HOME=/root
|
|
||||||
|
|
||||||
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${pkgs.disnix_activation_scripts}/libexec/disnix/activation-scripts
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user