- The Disnix service needs Nix in its PATH for now
- Implemented an extraGroups property for tomcat to grant a tomcat application access to the Disnix service svn path=/nixos/trunk/; revision=24561
This commit is contained in:
parent
9359ebf975
commit
e39b10a4d9
@ -49,6 +49,7 @@ in
|
|||||||
services.dbus.packages = [ pkgs.disnix ];
|
services.dbus.packages = [ pkgs.disnix ];
|
||||||
|
|
||||||
services.tomcat.enable = cfg.useWebServiceInterface;
|
services.tomcat.enable = cfg.useWebServiceInterface;
|
||||||
|
services.tomcat.extraGroups = [ "disnix" ];
|
||||||
services.tomcat.javaOpts = "${optionalString cfg.useWebServiceInterface "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"} ";
|
services.tomcat.javaOpts = "${optionalString cfg.useWebServiceInterface "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"} ";
|
||||||
services.tomcat.sharedLibs = []
|
services.tomcat.sharedLibs = []
|
||||||
++ optional cfg.useWebServiceInterface "${pkgs.DisnixWebService}/share/java/DisnixConnection.jar"
|
++ optional cfg.useWebServiceInterface "${pkgs.DisnixWebService}/share/java/DisnixConnection.jar"
|
||||||
@ -67,6 +68,9 @@ in
|
|||||||
|
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
|
export PATH=/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin
|
||||||
|
export HOME=/root
|
||||||
|
|
||||||
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts
|
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -26,6 +26,12 @@ in
|
|||||||
description = "Location where Tomcat stores configuration files, webapplications and logfiles";
|
description = "Location where Tomcat stores configuration files, webapplications and logfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraGroups = mkOption {
|
||||||
|
default = [];
|
||||||
|
example = [ "users" ];
|
||||||
|
description = "Defines extra groups to which the tomcat user belongs.";
|
||||||
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
default = "tomcat";
|
default = "tomcat";
|
||||||
description = "User account under which Apache Tomcat runs.";
|
description = "User account under which Apache Tomcat runs.";
|
||||||
@ -104,6 +110,7 @@ in
|
|||||||
uid = config.ids.uids.tomcat;
|
uid = config.ids.uids.tomcat;
|
||||||
description = "Tomcat user";
|
description = "Tomcat user";
|
||||||
home = "/homeless-shelter";
|
home = "/homeless-shelter";
|
||||||
|
extraGroups = cfg.extraGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
jobs.tomcat =
|
jobs.tomcat =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user