Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dafb8cd52 | |||
| 8b12656149 | |||
| d622040d30 | |||
| 2bc05c2d6d | |||
| 5fa8444112 | |||
| 8874b33a5d | |||
| 521ccdc886 | |||
| 07b648db9a |
@@ -287,6 +287,16 @@
|
|||||||
tenants = [
|
tenants = [
|
||||||
"poyfestival.com"
|
"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;
|
base_domain = settings.base_domain;
|
||||||
override_local_dns = true;
|
override_local_dns = true;
|
||||||
nameservers.global = settings.nameservers;
|
nameservers.global = settings.nameservers;
|
||||||
|
magic_dns = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,6 @@
|
|||||||
"AutofillAddressEnabled" = false;
|
"AutofillAddressEnabled" = false;
|
||||||
"AutofillCreditCardEnabled" = false;
|
"AutofillCreditCardEnabled" = false;
|
||||||
"TranslateEnabled" = 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.sddm.enable = lib.mkForce false;
|
||||||
services.displayManager.gdm.enable = true;
|
services.displayManager.gdm.enable = true;
|
||||||
services.displayManager.gdm.wayland = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,16 @@
|
|||||||
description = "List of tenants website to host on the instance";
|
description = "List of tenants website to host on the instance";
|
||||||
example = [ "example.com" ];
|
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;
|
package = wp-pkg domain;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
define('FS_METHOD', 'direct');
|
define('FS_METHOD', 'direct');
|
||||||
'';
|
''
|
||||||
|
+ settings.wpExtraConfig;
|
||||||
themes = { };
|
themes = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -104,6 +115,16 @@
|
|||||||
443
|
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 (
|
security.acme.certs = lib.listToAttrs (
|
||||||
map (
|
map (
|
||||||
tenant:
|
tenant:
|
||||||
@@ -114,6 +135,8 @@
|
|||||||
) settings.tenants
|
) settings.tenants
|
||||||
);
|
);
|
||||||
|
|
||||||
|
services.nginx.clientMaxBodySize = "128m";
|
||||||
|
|
||||||
services.nginx.virtualHosts = lib.listToAttrs (
|
services.nginx.virtualHosts = lib.listToAttrs (
|
||||||
map (
|
map (
|
||||||
tenant:
|
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 = {
|
serviceConfig = {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
WorkingDirectory = "${file-uploader}";
|
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";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
path = [ pkgs.nodejs_20 ];
|
path = [ pkgs.nodejs ];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ buildNpmPackage {
|
|||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
nodejs_20
|
nodejs
|
||||||
breakpointHook
|
breakpointHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user