aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/web-servers/jboss/default.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-10-05 12:43:18 +0000
committerKatharina Fey <kookie@spacekookie.de>2019-10-05 12:44:52 +0000
commitcf85056ba64caf3267d43255ef4a1243e9c8ee3b (patch)
tree3051519e9c8275b870aac43f80af875715c9d124 /nixpkgs/nixos/modules/services/web-servers/jboss/default.nix
parent1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (diff)
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
Add 'nixpkgs/' from commit '2436c27541b2f52deea3a4c1691216a02152e729'
git-subtree-dir: nixpkgs git-subtree-mainline: 1148b1d122bc03e9a3665856c9b7bb96bd4e3994 git-subtree-split: 2436c27541b2f52deea3a4c1691216a02152e729
Diffstat (limited to 'nixpkgs/nixos/modules/services/web-servers/jboss/default.nix')
-rw-r--r--nixpkgs/nixos/modules/services/web-servers/jboss/default.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/web-servers/jboss/default.nix b/nixpkgs/nixos/modules/services/web-servers/jboss/default.nix
new file mode 100644
index 00000000000..d28724281a8
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/web-servers/jboss/default.nix
@@ -0,0 +1,80 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.jboss;
+
+ jbossService = pkgs.stdenv.mkDerivation {
+ name = "jboss-server";
+ builder = ./builder.sh;
+ inherit (pkgs) jboss su;
+ inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK;
+ };
+
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ services.jboss = {
+
+ enable = mkOption {
+ default = false;
+ description = "Whether to enable JBoss. WARNING : this package is outdated and is known to have vulnerabilities.";
+ };
+
+ tempDir = mkOption {
+ default = "/tmp";
+ description = "Location where JBoss stores its temp files";
+ };
+
+ logDir = mkOption {
+ default = "/var/log/jboss";
+ description = "Location of the logfile directory of JBoss";
+ };
+
+ serverDir = mkOption {
+ description = "Location of the server instance files";
+ default = "/var/jboss/server";
+ };
+
+ deployDir = mkOption {
+ description = "Location of the deployment files";
+ default = "/nix/var/nix/profiles/default/server/default/deploy/";
+ };
+
+ libUrl = mkOption {
+ default = "file:///nix/var/nix/profiles/default/server/default/lib";
+ description = "Location where the shared library JARs are stored";
+ };
+
+ user = mkOption {
+ default = "nobody";
+ description = "User account under which jboss runs.";
+ };
+
+ useJK = mkOption {
+ default = false;
+ description = "Whether to use to connector to the Apache HTTP server";
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf config.services.jboss.enable {
+ systemd.services.jboss = {
+ description = "JBoss server";
+ script = "${jbossService}/bin/control start";
+ wantedBy = [ "multi-user.target" ];
+ };
+ };
+}