mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/redmine: allow user to override contents of additional_environment.rb
This commit is contained in:
parent
dee97b8b44
commit
6cf743e52d
1 changed files with 7 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
|
inherit (lib) mkBefore mkDefault mkEnableOption mkIf mkOption mkRemovedOptionModule types;
|
||||||
inherit (lib) concatStringsSep literalExample mapAttrsToList;
|
inherit (lib) concatStringsSep literalExample mapAttrsToList;
|
||||||
inherit (lib) optional optionalAttrs optionalString;
|
inherit (lib) optional optionalAttrs optionalString;
|
||||||
|
|
||||||
|
@ -21,13 +21,7 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurationYml = format.generate "configuration.yml" cfg.settings;
|
configurationYml = format.generate "configuration.yml" cfg.settings;
|
||||||
|
additionalEnvironment = pkgs.writeText "additional_environment.rb" cfg.extraEnv;
|
||||||
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";
|
unpackTheme = unpack "theme";
|
||||||
unpackPlugin = unpack "plugin";
|
unpackPlugin = unpack "plugin";
|
||||||
|
@ -252,6 +246,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.redmine.extraEnv = mkBefore ''
|
||||||
|
config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
|
||||||
|
config.logger.level = Logger::INFO
|
||||||
|
'';
|
||||||
|
|
||||||
services.mysql = mkIf mysqlLocal {
|
services.mysql = mkIf mysqlLocal {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = mkDefault pkgs.mariadb;
|
package = mkDefault pkgs.mariadb;
|
||||||
|
|
Loading…
Reference in a new issue