1 { config, lib, pkgs, ... }:
7 cfg = config.services.jboss;
9 jbossService = pkgs.stdenv.mkDerivation {
10 name = "jboss-server";
11 builder = ./builder.sh;
12 inherit (pkgs) jboss su;
13 inherit (cfg) tempDir logDir libUrl deployDir serverDir user useJK;
29 description = "Whether to enable JBoss. WARNING : this package is outdated and is known to have vulnerabilities.";
35 description = "Location where JBoss stores its temp files";
39 default = "/var/log/jboss";
41 description = "Location of the logfile directory of JBoss";
44 serverDir = mkOption {
45 description = "Location of the server instance files";
46 default = "/var/jboss/server";
50 deployDir = mkOption {
51 description = "Location of the deployment files";
52 default = "/nix/var/nix/profiles/default/server/default/deploy/";
57 default = "file:///nix/var/nix/profiles/default/server/default/lib";
58 description = "Location where the shared library JARs are stored";
64 description = "User account under which jboss runs.";
71 description = "Whether to use to connector to the Apache HTTP server";
81 config = mkIf config.services.jboss.enable {
82 systemd.services.jboss = {
83 description = "JBoss server";
84 script = "${jbossService}/bin/control start";
85 wantedBy = [ "multi-user.target" ];