Sorry for the assumption! Specifically you should add this to your configuration.nix
:
systemd.services.phpfpm-simanja.serviceConfig.ProtectHome = lib.mkForce false; # or pkgs.lib.mkForce if 'lib' is not in scope
When you declare services.phpfpm.pools.simanja
NixOS will create a systemd
unit named phpfpm-simanja.service
which you can reference by systemd.services.phpfpm-simanja
. By default the phpfpm
module in NixOS generates systemd
services which set ProtectHome = true;
. ProtectHome = false
will make your home directory inaccessible which is why you received the error mentioned above. ProtectHome = true;
is a good default for production servers… though maybe not the best for development in your case.
I hope this explanation helps.