Compare commits

..

2 commits

Author SHA1 Message Date
2763fe8b15
Merge branch 'fix/nix-fpm-debug-env' 2026-07-02 16:47:57 +03:00
d23e861625
use systemd fpm env 2026-07-02 16:47:26 +03:00

View file

@ -46,14 +46,6 @@ let
SESSION_SECURE_COOKIE = lib.boolToString cfg.backend.cookieSecure; SESSION_SECURE_COOKIE = lib.boolToString cfg.backend.cookieSecure;
}; };
fpmBaseEnvironment = lib.filterAttrs (
environmentName: environmentValue: environmentValue != ""
) appEnvironment;
fpmEnvironment = fpmBaseEnvironment // {
APP_KEY = "$APP_KEY";
};
artisan = "${phpPackage}/bin/php ${appDir}/artisan"; artisan = "${phpPackage}/bin/php ${appDir}/artisan";
makeDirectoryRule = path: "d ${path} 0750 ${cfg.user} ${cfg.group} - -"; makeDirectoryRule = path: "d ${path} 0750 ${cfg.user} ${cfg.group} - -";
@ -246,7 +238,6 @@ in
services.phpfpm.pools.${poolName} = { services.phpfpm.pools.${poolName} = {
inherit (cfg) user group; inherit (cfg) user group;
inherit phpPackage; inherit phpPackage;
phpEnv = fpmEnvironment;
settings = { settings = {
"catch_workers_output" = true; "catch_workers_output" = true;
"clear_env" = "no"; "clear_env" = "no";
@ -292,6 +283,7 @@ in
systemd.services.${phpfpmService} = { systemd.services.${phpfpmService} = {
after = [ "${setupService}.service" ]; after = [ "${setupService}.service" ];
requires = [ "${setupService}.service" ]; requires = [ "${setupService}.service" ];
environment = appEnvironment;
serviceConfig = { serviceConfig = {
EnvironmentFile = cfg.backend.environmentFile; EnvironmentFile = cfg.backend.environmentFile;
ReadWritePaths = [ ReadWritePaths = [