<commit_before>{ 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 {
        type = types.bool;
        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 {
        type = types.bool;<commit_msg>nixos/module/jboss: Add types to options (#110451)<commit_after>{ 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 {
        type = types.bool;
        default = false;
        description = "Whether to enable JBoss. WARNING : this package is outdated and is known to have vulnerabilities.";
      };

      tempDir = mkOption {
        default = "/tmp";
        type = types.str;
        description = "Location where JBoss stores its temp files";
      };

      logDir = mkOption {
        default = "/var/log/jboss";
        type = types.str;
        description = "Location of the logfile directory of JBoss";
      };

      serverDir = mkOption {
        description = "Location of the server instance files";
        default = "/var/jboss/server";
        type = types.str;
      };

      deployDir = mkOption {
        description = "Location of the deployment files";
        default = "/nix/var/nix/profiles/default/server/default/deploy/";
        type = types.str;
      };

      libUrl = mkOption {
        default = "file:///nix/var/nix/profiles/default/server/default/lib";
        description = "Location where the shared library JARs are stored";
        type = types.str;
      };

      user = mkOption {
        default = "nobody";
        description = "User account under which jboss runs.";
        type = types.str;
      };

      useJK = mkOption {
        type = types.bool;
{'fraction_non_alphanumeric': 0.11291807302853636, 'fraction_numerical': 0.001841055538508745, 'mean_word_length': 2.087121212121212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6982122', 'n_tokens_mistral': 1001, 'n_tokens_neox': 927, 'n_words': 270}