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;
|
php = pkgs.php74;
|
||||||
};
|
};
|
||||||
phpIni = php.phpIni;
|
phpIni = php.phpIni;
|
||||||
enablePageSpeed = pkgs.stdenv.isLinux && appConfig.googlePageSpeed.enable;
|
|
||||||
app = callPackage ./app.nix {
|
app = callPackage ./app.nix {
|
||||||
inherit appConfig;
|
inherit appConfig;
|
||||||
writeable = {
|
writeable = {
|
||||||
|
@ -29,13 +28,23 @@ in {
|
||||||
wpConfigSecrets = mkOption {
|
wpConfigSecrets = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
enablePageSpeed = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = pkgs.stdenv.isLinux && appConfig.googlePageSpeed.enable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.wp-cli ];
|
environment.systemPackages = [ pkgs.wp-cli ];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
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;
|
# httpConfig = nginxConfig;
|
||||||
# TODO: ajouter les locations pour wordpress
|
# TODO: ajouter les locations pour wordpress
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue