Compare commits

..

8 Commits

10 changed files with 44 additions and 7 deletions
+10
View File
@@ -287,6 +287,16 @@
tenants = [
"poyfestival.com"
];
phpfpmOptions = ''
upload_max_filesize=64M
post_max_size=128M
'';
wpExtraConfig = ''
define('WP_MEMORY_LIMIT', '256M');
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
'';
};
};
};
+1
View File
@@ -173,6 +173,7 @@
base_domain = settings.base_domain;
override_local_dns = true;
nameservers.global = settings.nameservers;
magic_dns = false;
};
};
@@ -66,8 +66,6 @@
"AutofillAddressEnabled" = false;
"AutofillCreditCardEnabled" = false;
"TranslateEnabled" = false;
"DnsOverHttpsMode" = "secure";
"DnsOverHttpsTemplates" = "https://dns.adguard-dns.com/dns-query";
};
};
@@ -5,5 +5,4 @@
services.displayManager.sddm.enable = lib.mkForce false;
services.displayManager.gdm.enable = true;
services.displayManager.gdm.wayland = true;
}
+24 -1
View File
@@ -18,6 +18,16 @@
description = "List of tenants website to host on the instance";
example = [ "example.com" ];
};
phpfpmOptions = lib.mkOption {
type = with lib.types; lines;
default = "";
description = "options appended to the PHP configuration file";
};
wpExtraConfig = lib.mkOption {
type = with lib.types; lines;
default = "";
description = "Any additional text to be appended to the wp-config.php";
};
};
};
@@ -44,7 +54,8 @@
package = wp-pkg domain;
extraConfig = ''
define('FS_METHOD', 'direct');
'';
''
+ settings.wpExtraConfig;
themes = { };
};
@@ -104,6 +115,16 @@
443
];
services.phpfpm.pools = builtins.listToAttrs (
map (
tenant: lib.nameValuePair "wordpress-${tenant}" { phpOptions = settings.phpfpmOptions; }
) settings.tenants
);
security.acme.acceptTerms = true;
users.users.nginx.extraGroups = [ "acme" ];
security.acme.certs = lib.listToAttrs (
map (
tenant:
@@ -114,6 +135,8 @@
) settings.tenants
);
services.nginx.clientMaxBodySize = "128m";
services.nginx.virtualHosts = lib.listToAttrs (
map (
tenant:
@@ -0,0 +1,4 @@
{
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"type": "age"
}
@@ -0,0 +1 @@
fake_line_value
+2 -2
View File
@@ -173,10 +173,10 @@ in
serviceConfig = {
User = cfg.user;
WorkingDirectory = "${file-uploader}";
ExecStart = "${lib.getExe pkgs.nodejs_20} ${file-uploader}/src/be/index.js";
ExecStart = "${lib.getExe pkgs.nodejs} ${file-uploader}/src/be/index.js";
Restart = "on-failure";
};
path = [ pkgs.nodejs_20 ];
path = [ pkgs.nodejs ];
};
environment.systemPackages = [
+1 -1
View File
@@ -17,7 +17,7 @@ buildNpmPackage {
version = "1.0.0";
nativeBuildInputs = with pkgs; [
nodejs_20
nodejs
breakpointHook
];