nixos-config/config/services/wordpress.nix

86 lines
1.8 KiB
Nix
Raw Normal View History

2023-04-25 18:56:36 +00:00
{
lib,
pkgs,
...
}: {
2023-04-24 19:45:40 +00:00
imports = [../../modules/wordpress.nix];
2023-04-24 18:58:09 +00:00
services.mysql = {
enable = true;
package = pkgs.mariadb;
};
services.wordpress.webserver = "caddy";
services.wordpress.sites."lotte.chir.rs" = {
settings = {
# Needed to run behind reverse proxy
FORCE_SSL_ADMIN = true;
};
extraConfig = ''
$_SERVER['HTTPS']='on';
'';
2023-04-28 07:34:50 +00:00
plugins = {
inherit
(pkgs.wordpress-plugins)
google-sitemap-generator
indieweb
pubsubhubbub
indieweb-post-kinds
2023-04-28 08:33:50 +00:00
indieauth
2023-04-28 07:34:50 +00:00
syndication-links
micropub
webmention
activitypub
friends
webfinger
nodeinfo
classic-editor
wordpress-seo
2023-05-02 16:32:43 +00:00
modern-footnotes
the-plus-addons-for-block-editor
2023-09-08 11:39:34 +00:00
shortcoder
wp-dark-mode
wp-super-cache
2023-04-28 07:34:50 +00:00
;
};
themes = {
inherit
(pkgs.wordpress-themes)
sempress
twentytwentythree
;
};
2023-09-08 11:39:34 +00:00
poolConfig = {
pm = "dynamic";
"pm.max_children" = 460;
"pm.start_servers" = 4;
"pm.min_spare_servers" = 4;
"pm.max_spare_servers" = 64;
};
2023-04-24 18:58:09 +00:00
};
2023-04-28 07:34:50 +00:00
nixpkgs.overlays = [
(self: super: {
wordpress = super.wordpress.overrideAttrs (oldAttrs: {
installPhase =
oldAttrs.installPhase
+ ''
ln -s /var/lib/wordpress/lotte.chir.rs/webp-express $out/share/wordpress/wp-content/webp-express
'';
});
})
];
systemd.tmpfiles.rules = [
"d '/var/lib/wordpress/lotte.chir.rs/webp-express' 0750 wordpress acme - -"
];
2023-04-24 19:45:40 +00:00
services.caddy.virtualHosts."lotte.chir.rs" = {
useACMEHost = "chir.rs";
logFormat = lib.mkForce "";
extraConfig = ''
2023-04-25 18:56:36 +00:00
import baseConfig
2023-04-24 19:45:40 +00:00
'';
};
2023-04-24 18:58:09 +00:00
}