]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - modules/private/websites/florian/app/default.nix
Move secrets to flakes
[perso/Immae/Config/Nix.git] / modules / private / websites / florian / app / default.nix
1 { environment, varDir, secretsPath
2 , composerEnv, fetchurl, sources }:
3 let
4 app = composerEnv.buildPackage (
5 import ./php-packages.nix { inherit composerEnv fetchurl; } //
6 rec {
7 version = sources.websites-florian-app.version;
8 pname = "tellesflorian";
9 name = "${pname}-${version}";
10 src = sources.websites-florian-app;
11 noDev = (environment == "prod");
12 preInstall = ''
13 export SYMFONY_ENV="${environment}"
14 '';
15 postInstall = ''
16 cd $out
17 rm app/config/parameters.yml
18 ln -sf ${secretsPath} app/config/parameters.yml
19 rm -rf var/{logs,cache}
20 ln -sf ${varDir}/var/{logs,cache,sessions} var/
21 '';
22 passthru = {
23 inherit varDir environment;
24 webRoot = "${app}/web";
25 };
26 });
27 in app