diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix index 2af249a8e96..99460a48835 100644 --- a/nixos/modules/services/web-servers/tomcat.nix +++ b/nixos/modules/services/web-servers/tomcat.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.services.tomcat; - tomcat = pkgs.tomcat7; + tomcat = cfg.package; in { @@ -21,6 +21,15 @@ in description = "Whether to enable Apache Tomcat"; }; + package = mkOption { + type = types.package; + default = pkgs.tomcat7; + example = lib.literalExample "pkgs.tomcat8"; + description = '' + Which tomcat package to use. + ''; + }; + baseDir = mkOption { default = "/var/tomcat"; description = "Location where Tomcat stores configuration files, webapplications and logfiles";