- </Directory>
- '' else ''
- <Directory ${root}>
- Options Indexes FollowSymLinks MultiViews Includes
- AllowOverride All
- Require all granted
- </Directory>
- ''}
- '';
- };
- activationScript = {
- deps = [ "wrappers" ];
- text = ''
- install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
- ${varDir}/var
- install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
- if [ ! -f "${varDir}/currentWebappDir" -o \
- "${webappDir}" != "$(cat ${varDir}/currentWebappDir 2>/dev/null)" ]; then
- pushd ${webappDir} > /dev/null
- $wrapperDir/sudo -u wwwrun ./bin/console --env=${environment} cache:clear --no-warmup
- popd > /dev/null
- echo -n "${webappDir}" > ${varDir}/currentWebappDir
- fi
- '';
- };
- webappDir = composerEnv.buildPackage (
- import ./php-packages.nix { inherit composerEnv fetchurl; } //
- fetchedGitPrivate ./tellesflorian.json //
- rec {
- noDev = (environment == "prod");
- preInstall = ''
- export SYMFONY_ENV="${environment}"
- '';
- postInstall = ''
- cd $out
- rm app/config/parameters.yml
- ln -sf /run/keys/webapps/${environment}-tellesflorian app/config/parameters.yml
- rm -rf var/{logs,cache}
- ln -sf ${varDir}/var/{logs,cache,sessions} var/
- '';
- });
- webRoot = "${webappDir}/web";
+ </Directory>
+ '' else ''
+ <Directory ${root}>
+ Options Indexes FollowSymLinks MultiViews Includes
+ AllowOverride All
+ Require all granted
+ </Directory>
+ ''}
+ '';
+ };
+ activationScript = {
+ deps = [ "wrappers" ];
+ text = ''
+ install -m 0755 -o ${apache.user} -g ${apache.group} -d ${app.varDir} \
+ ${app.varDir}/var
+ install -m 0750 -o ${apache.user} -g ${apache.group} -d ${app.varDir}/phpSessions
+ '';