Merge pull request #55050 from aanderse/redmine-extra-env
nixos/redmine: add an extraEnv option, enable automatic log rotation
This commit is contained in:
commit
7ff8a16f07
@ -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…
x
Reference in New Issue
Block a user