forked from lukas/nixos-config
98 lines
3 KiB
Nix
98 lines
3 KiB
Nix
{pkgs, ...}:
|
|
|
|
let
|
|
media-sync = pkgs.stdenv.mkDerivation rec {
|
|
pname = "media-sync";
|
|
version = "1.5.2"; # replace with the desired version
|
|
|
|
src = pkgs.fetchzip {
|
|
url = "https://downloads.wordpress.org/plugin/media-sync.${version}.zip";
|
|
hash = "sha256-LdR5mjk/ZXViMbesBJ8L3xHMgRd24EeaJGTaN70TElY="; # replace with real sha256
|
|
};
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
|
|
wordpress-plugin-mu-manager = pkgs.stdenv.mkDerivation rec {
|
|
pname = "mu-manager";
|
|
version = "0.0.3"; # replace with the desired version
|
|
|
|
src = pkgs.fetchzip {
|
|
url = "https://downloads.wordpress.org/plugin/mu-manager.${version}.zip";
|
|
hash = "sha256-jRyJo2LIE5fbQmAaWxX606ByrdBxvOT2OfCLaH0430o="; # replace with real sha256
|
|
};
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
|
|
wordpress-plugin-elementor = pkgs.stdenv.mkDerivation rec {
|
|
pname = "elementor";
|
|
version = "4.1.1"; # replace with the desired version
|
|
|
|
src = pkgs.fetchzip {
|
|
url = "https://downloads.wordpress.org/plugin/elementor.${version}.zip";
|
|
hash = "sha256-fRlC12l6QteINapI49N2MXlbEq4YfGM3WrwaG/XOgpg="; # replace with real sha256
|
|
};
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
safe-svg= pkgs.stdenv.mkDerivation rec {
|
|
pname = "safe-svg";
|
|
version = "2.4.0"; # replace with the desired version
|
|
|
|
src = pkgs.fetchzip {
|
|
url = "https://downloads.wordpress.org/plugin/safe-svg.${version}.zip";
|
|
hash = "sha256-p+erp9PuUg+47gAWG55pJ2C/FNqEdb8NYGKnDlVSt80="; # replace with real sha256
|
|
};
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
svg-support= pkgs.stdenv.mkDerivation rec {
|
|
pname = "svg-support";
|
|
version = "2.5.16"; # replace with the desired version
|
|
|
|
src = pkgs.fetchzip {
|
|
url = "https://downloads.wordpress.org/plugin/svg-support.${version}.zip";
|
|
hash = "sha256-6xJwYLhHrmM4+ffPCU0BKnVMAvtz87o5iBAw0KI9MoY="; # replace with real sha256
|
|
};
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
};
|
|
in
|
|
{
|
|
services.wordpress.sites."hdm" = {
|
|
themes = {
|
|
inherit (pkgs.wordpressPackages.themes) twentytwentyfive;
|
|
};
|
|
plugins = {
|
|
elementor = wordpress-plugin-elementor;
|
|
safe-svg = safe-svg;
|
|
media-synce = media-sync;
|
|
# svg-support = svg-support;
|
|
mu-manager = wordpress-plugin-mu-manager;
|
|
# inherit (pkgs.wordpressPackages.plugins) Elementor;
|
|
};
|
|
settings = {
|
|
WP_DEFAULT_THEME = "responsive";
|
|
WP_HOME = "https://hdm.0ff.space";
|
|
WP_SITEURL = "https://hdm.0ff.space";
|
|
# Needed to run behind reverse proxy
|
|
FORCE_SSL_ADMIN = true;
|
|
WP_DEBUG = true;
|
|
WP_DEBUG_LOG = true;
|
|
};
|
|
extraConfig = ''
|
|
$_SERVER['HTTPS']='on';
|
|
ini_set( 'error_log', '/var/lib/wordpress/hdm/debug.log' );
|
|
'';
|
|
# function allow_svg_upload($mimes) {
|
|
# $mimes['svg'] = 'image/svg+xml';
|
|
# return $mimes;
|
|
# }
|
|
# add_filter('upload_mimes', 'allow_svg_upload');
|
|
virtualHost.listen =
|
|
[
|
|
{ ip = "127.0.0.1"; port = 8055; }
|
|
];
|
|
};
|
|
services.phpfpm.pools."wordpress-hdm".phpOptions = ''
|
|
upload_max_filesize=1G
|
|
post_max_size=1G
|
|
file_uploads=On
|
|
'';
|
|
}
|