Clean up the place, setup and moving lemp.nix over

This commit is contained in:
Aaron Honeycutt 2022-06-18 08:55:32 -06:00
parent 34424406fe
commit 3e815276c3
3 changed files with 31 additions and 88 deletions

31
dev/lemp.nix Normal file
View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }: {
services.nginx = {
enable = true;
virtualHosts."127.0.0.1" = {
root = "/var/www/html";
locations."~ \.php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
fastcgi_index index.php;
'';
};
};
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;
};
};
}