diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-22 12:49:20 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-22 12:49:20 +0100 |
commit | 9d90e7e281e8f4cf9371c17c812a1ac9c08aa66d (patch) | |
tree | 0b011ca0aeeef02dce03a3c825d9a037c5cfc01a /virtual/modules/websites/tools/git | |
parent | 0f3047a77ee1e0b3d943e39d50301ba85821c572 (diff) | |
download | Nix-9d90e7e281e8f4cf9371c17c812a1ac9c08aa66d.tar.gz Nix-9d90e7e281e8f4cf9371c17c812a1ac9c08aa66d.tar.zst Nix-9d90e7e281e8f4cf9371c17c812a1ac9c08aa66d.zip |
Remove use of environment variables
Fixes https://git.immae.eu/mantisbt/view.php?id=113
Diffstat (limited to 'virtual/modules/websites/tools/git')
-rw-r--r-- | virtual/modules/websites/tools/git/default.nix | 7 | ||||
-rw-r--r-- | virtual/modules/websites/tools/git/mantisbt/mantisbt.nix | 11 |
2 files changed, 9 insertions, 9 deletions
diff --git a/virtual/modules/websites/tools/git/default.nix b/virtual/modules/websites/tools/git/default.nix index f53350e..91aa1d0 100644 --- a/virtual/modules/websites/tools/git/default.nix +++ b/virtual/modules/websites/tools/git/default.nix | |||
@@ -1,6 +1,9 @@ | |||
1 | { lib, pkgs, config, mylibs, ... }: | 1 | { lib, pkgs, config, myconfig, mylibs, ... }: |
2 | let | 2 | let |
3 | mantisbt = pkgs.callPackage ./mantisbt/mantisbt.nix { inherit (mylibs) checkEnv fetchedGithub; }; | 3 | mantisbt = pkgs.callPackage ./mantisbt/mantisbt.nix { |
4 | inherit (mylibs) fetchedGithub; | ||
5 | env = myconfig.env.tools.mantisbt; | ||
6 | }; | ||
4 | gitweb = pkgs.callPackage ./gitweb/gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; }; | 7 | gitweb = pkgs.callPackage ./gitweb/gitweb.nix { gitoliteDir = config.services.myGitolite.gitoliteDir; }; |
5 | 8 | ||
6 | cfg = config.services.myWebsites.tools.git; | 9 | cfg = config.services.myWebsites.tools.git; |
diff --git a/virtual/modules/websites/tools/git/mantisbt/mantisbt.nix b/virtual/modules/websites/tools/git/mantisbt/mantisbt.nix index c1cb60d..bc2ff3a 100644 --- a/virtual/modules/websites/tools/git/mantisbt/mantisbt.nix +++ b/virtual/modules/websites/tools/git/mantisbt/mantisbt.nix | |||
@@ -1,4 +1,4 @@ | |||
1 | { lib, checkEnv, writeText, stdenv, fetchurl, fetchedGithub }: | 1 | { lib, env, writeText, stdenv, fetchurl, fetchedGithub }: |
2 | let | 2 | let |
3 | mantisbt = let | 3 | mantisbt = let |
4 | plugins = { | 4 | plugins = { |
@@ -18,17 +18,14 @@ let | |||
18 | }; | 18 | }; |
19 | in rec { | 19 | in rec { |
20 | config = | 20 | config = |
21 | assert checkEnv "NIXOPS_MANTISBT_DB_PASSWORD"; | ||
22 | assert checkEnv "NIXOPS_MANTISBT_MASTER_SALT"; | ||
23 | assert checkEnv "NIXOPS_MANTISBT_LDAP_PASSWORD"; | ||
24 | writeText "config_inc.php" '' | 21 | writeText "config_inc.php" '' |
25 | <?php | 22 | <?php |
26 | $g_hostname = 'db-1.immae.eu'; | 23 | $g_hostname = 'db-1.immae.eu'; |
27 | $g_db_username = 'mantisbt'; | 24 | $g_db_username = 'mantisbt'; |
28 | $g_db_password = '${builtins.getEnv "NIXOPS_MANTISBT_DB_PASSWORD"}'; | 25 | $g_db_password = '${env.postgresql.password}'; |
29 | $g_database_name = 'mantisbt'; | 26 | $g_database_name = 'mantisbt'; |
30 | $g_db_type = 'pgsql'; | 27 | $g_db_type = 'pgsql'; |
31 | $g_crypto_master_salt = '${builtins.getEnv "NIXOPS_MANTISBT_MASTER_SALT"}'; | 28 | $g_crypto_master_salt = '${env.master_salt}'; |
32 | $g_allow_signup = OFF; | 29 | $g_allow_signup = OFF; |
33 | $g_allow_anonymous_login = ON; | 30 | $g_allow_anonymous_login = ON; |
34 | $g_anonymous_account = 'anonymous'; | 31 | $g_anonymous_account = 'anonymous'; |
@@ -48,7 +45,7 @@ let | |||
48 | $g_ldap_server = 'ldaps://ldap.immae.eu:636'; | 45 | $g_ldap_server = 'ldaps://ldap.immae.eu:636'; |
49 | $g_ldap_root_dn = 'ou=users,dc=immae,dc=eu'; | 46 | $g_ldap_root_dn = 'ou=users,dc=immae,dc=eu'; |
50 | $g_ldap_bind_dn = 'cn=mantisbt,ou=services,dc=immae,dc=eu'; | 47 | $g_ldap_bind_dn = 'cn=mantisbt,ou=services,dc=immae,dc=eu'; |
51 | $g_ldap_bind_passwd = '${builtins.getEnv "NIXOPS_MANTISBT_LDAP_PASSWORD"}'; | 48 | $g_ldap_bind_passwd = '${env.ldap.password}'; |
52 | $g_use_ldap_email = ON; | 49 | $g_use_ldap_email = ON; |
53 | $g_use_ldap_realname = ON; | 50 | $g_use_ldap_realname = ON; |
54 | $g_ldap_uid_field = 'uid'; | 51 | $g_ldap_uid_field = 'uid'; |