module(wp): nginx++ with modules
This commit is contained in:
parent
63ed846f8f
commit
5ce1e11537
1 changed files with 11 additions and 2 deletions
|
@ -14,7 +14,6 @@ let
|
|||
php = pkgs.php74;
|
||||
};
|
||||
phpIni = php.phpIni;
|
||||
enablePageSpeed = pkgs.stdenv.isLinux && appConfig.googlePageSpeed.enable;
|
||||
app = callPackage ./app.nix {
|
||||
inherit appConfig;
|
||||
writeable = {
|
||||
|
@ -29,13 +28,23 @@ in {
|
|||
wpConfigSecrets = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
enablePageSpeed = mkOption {
|
||||
type = types.bool;
|
||||
default = pkgs.stdenv.isLinux && appConfig.googlePageSpeed.enable;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.wp-cli ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
# package = pkgs.callPackage ./nginx.nix { inherit enablePageSpeed; };
|
||||
package = pkgs.nginx.override {
|
||||
modules = with pkgs.nginxModules [
|
||||
dav
|
||||
fastcgi-cache-purge
|
||||
moreheaders
|
||||
] ++ optional cfg.enablePageSpeed pagespeed;
|
||||
};
|
||||
# httpConfig = nginxConfig;
|
||||
# TODO: ajouter les locations pour wordpress
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue