LEMP stack config

Up to now I have used LAMP only in the different linux distros. Nginx is
new for me.
With the help of NixOS wiki I have edited configuration.nix, and after

nixos-rebuild switch

ran info.php . Browser displayed PHP 8.2.18 page.
But after reboot nginx reported error

An error occurred during a connection to localhost

when trying info.php. I had rebuild nixos and php worked again. And such is every time when I reboot NixOS.
I find that after reboot

[root@nixos:/]# ps -ax | grep php
3342 pts/0 S+ 0:00 grep php

Only one php process exists. After nixos-rebuild switch

[root@nixos:/]# ps -ax | grep php
9114 ? Ss 0:00 php-fpm: master process (/nix/store/4mvv1v52vif941p76mq3d7gd8qmi9l1d-phpfpm-mypool.conf)
9212 ? S 0:00 php-fpm: pool mypool
9213 ? S 0:00 php-fpm: pool mypool
9371 pts/0 S+ 0:00 grep php

Have I omitted something ?
This is relevant part of the configuration.nix file

services.nginx.enable = true;
services.nginx.package = pkgs.nginxStable.override { openssl = pkgs.libressl; };
services.nginx.virtualHosts.“localhost” = {
addSSL = true;
enableACME = true;
root = “/data/www/”;
locations.“~ \.php$”.extraConfig = ‘’
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
fastcgi_index index.php;
‘’;
};
security.acme = {
acceptTerms = true;
defaults.email = “postmaster@vcelarim.sk”;
};

services.mysql = {
enable = true;
package = pkgs.mariadb;
};
services.phpfpm.pools.mypool = {
user = “nobody”;
settings = {
“pm” = “dynamic”;
“listen.owner” = config.services.nginx.user;
“pm.max_children” = 5;
“pm.start_servers” = 2;
“pm.min_spare_servers” = 1;
“pm.max_spare_servers” = 3;
“pm.max_requests” = 500;
};
};

Continuing the discussion from LEMP stack config:

Is it possible that the boot entry is not pointing to the new generation?
Because bootloader points to the 1. generations

cat /boot/loader/loader.conf
timeout 5
default nixos-generation-1.conf
console-mode keep

and

ls -l /nix/var/nix/profiles/
total 104
lrwxrwxrwx 1 root root 43 apr 22 16:10 default → /nix/var/nix/profiles/per-user/root/profile
drwxr-xr-x 3 root root 4096 apr 22 15:48 per-user
lrwxrwxrwx 1 root root 14 máj 1 20:18 system → system-25-link