nixos: adjust to 20.09 changes

Most notably the php5 expression needed to be reworked.
This commit is contained in:
steveej 2020-10-18 20:14:11 +02:00
parent 89c9f9e606
commit 405ca2ade4
4 changed files with 47 additions and 24 deletions

View file

@ -2,7 +2,7 @@
, localAddress
, httpsPort ? 443
}: {
config = { config, pkgs, ... }: {
config = { config, pkgs, lib, ... }: {
imports = [
../profiles/containers/configuration.nix
];
@ -30,23 +30,16 @@
locations."~ ^(.+\.php)(.*)$".extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
fastcgi_index index.php;
'';
};
nixpkgs.config.php = {
imap = false;
openssl = false;
curl = false;
ldap = false;
};
services.phpfpm.pools.mypool = {
phpPackage = pkgs.php56;
listen = "127.0.0.1:9000";
user = "nobody";
phpPackage = pkgs.php5;
settings = {
"listen.owner" = config.services.nginx.user;
"pm" = "dynamic";
"pm.max_children" = 5;
"pm.start_servers" = 2;
@ -58,6 +51,13 @@
};
};
# the custom php5 we're using here has no fpm-systemd, so the default `Type = "notify"` won't work
systemd.services."phpfpm-mypool" = {
serviceConfig = {
Type = lib.mkForce "simple";
};
};
services.mysql = {
enable = true;
package = pkgs.mariadb;