mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
- 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
2 changed files with 11 additions and 0 deletions
|
@ -49,6 +49,7 @@ in
|
|||
services.dbus.packages = [ pkgs.disnix ];
|
||||
|
||||
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.sharedLibs = []
|
||||
++ optional cfg.useWebServiceInterface "${pkgs.DisnixWebService}/share/java/DisnixConnection.jar"
|
||||
|
@ -67,6 +68,9 @@ in
|
|||
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -26,6 +26,12 @@ in
|
|||
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 {
|
||||
default = "tomcat";
|
||||
description = "User account under which Apache Tomcat runs.";
|
||||
|
@ -104,6 +110,7 @@ in
|
|||
uid = config.ids.uids.tomcat;
|
||||
description = "Tomcat user";
|
||||
home = "/homeless-shelter";
|
||||
extraGroups = cfg.extraGroups;
|
||||
};
|
||||
|
||||
jobs.tomcat =
|
||||
|
|
Loading…
Reference in a new issue