Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dafb8cd52 | |||
| 8b12656149 | |||
| d622040d30 | |||
| 2bc05c2d6d | |||
| 5fa8444112 | |||
| 8874b33a5d | |||
| 521ccdc886 | |||
| 07b648db9a |
@@ -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);
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 @@
|
||||
26.11
|
||||
@@ -0,0 +1 @@
|
||||
fake_line_value
|
||||
@@ -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 = [
|
||||
|
||||
@@ -17,7 +17,7 @@ buildNpmPackage {
|
||||
version = "1.0.0";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nodejs_20
|
||||
nodejs
|
||||
breakpointHook
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user