X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fgit%2Fmantisbt.nix;h=2ef76afe0637a4edd1b5c4ce48cae2fbf615fe64;hb=750fe5a43b957b91a26069cf8a4fe19fc7b2633c;hp=9996d230140ab4b32e565d449af6ed03e6fcab52;hpb=05a3b25228d22943e42e3c492d0329415e549266;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/git/mantisbt.nix b/modules/private/websites/tools/git/mantisbt.nix index 9996d23..2ef76af 100644 --- a/modules/private/websites/tools/git/mantisbt.nix +++ b/modules/private/websites/tools/git/mantisbt.nix @@ -1,4 +1,4 @@ -{ env, mantisbt_2, mantisbt_2-plugins }: +{ env, mantisbt_2, mantisbt_2-plugins, config }: rec { activationScript = { deps = [ "httpd" ]; @@ -6,8 +6,7 @@ rec { install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt ''; }; - keys = [{ - dest = "webapps/tools-mantisbt"; + keys."webapps/tools-mantisbt" = { user = apache.user; group = apache.group; permissions = "0400"; @@ -45,14 +44,13 @@ rec { $g_ldap_realname_field = 'cn'; $g_ldap_organization = '${env.ldap.filter}'; ''; - }]; - webRoot = (mantisbt_2.override { mantis_config = "/var/secrets/webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]); + }; + webRoot = (mantisbt_2.override { mantis_config = config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]); apache = rec { user = "wwwrun"; group = "wwwrun"; modules = [ "proxy_fcgi" ]; - webappName = "tools_mantisbt"; - root = "/run/current-system/webapps/${webappName}"; + root = webRoot; vhostConf = socket: '' Alias /mantisbt "${root}" @@ -75,7 +73,7 @@ rec { phpFpm = rec { serviceDeps = [ "postgresql.service" "openldap.service" ]; basedir = builtins.concatStringsSep ":" ( - [ webRoot "/var/secrets/webapps/tools-mantisbt" ] + [ webRoot config.secrets.fullPaths."webapps/tools-mantisbt" ] ++ webRoot.plugins); pool = { "listen.owner" = apache.user;