forked from mirrors/nixpkgs
nixos/redmine: add an extraEnv option (which could be used to turn on debug logging, etc...), enable automatic log rotation
This commit is contained in:
parent
6dea8fe56e
commit
52bd7c5f2a
|
@ -30,6 +30,13 @@ let
|
|||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
additionalEnvironment = pkgs.writeText "additional_environment.rb" ''
|
||||
config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
|
||||
config.logger.level = Logger::INFO
|
||||
|
||||
${cfg.extraEnv}
|
||||
'';
|
||||
|
||||
unpackTheme = unpack "theme";
|
||||
unpackPlugin = unpack "plugin";
|
||||
unpack = id: (name: source:
|
||||
|
@ -103,6 +110,19 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
extraEnv = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra configuration in additional_environment.rb.
|
||||
|
||||
See https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example
|
||||
'';
|
||||
example = literalExample ''
|
||||
config.logger.level = Logger::DEBUG
|
||||
'';
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
type = types.attrsOf types.path;
|
||||
default = {};
|
||||
|
@ -249,6 +269,9 @@ in
|
|||
# link in the application configuration
|
||||
ln -fs ${configurationYml} "${cfg.stateDir}/config/configuration.yml"
|
||||
|
||||
# link in the additional environment configuration
|
||||
ln -fs ${additionalEnvironment} "${cfg.stateDir}/config/additional_environment.rb"
|
||||
|
||||
|
||||
# link in all user specified themes
|
||||
rm -rf "${cfg.stateDir}/public/themes/"*
|
||||
|
|
Loading…
Reference in a new issue