Number of cores also when on metal
This commit is contained in:
parent
2d522f51f5
commit
f53a27baee
|
@ -31,6 +31,19 @@ in {
|
|||
pixelfed.enable = mkEnableOption "default Fediversity Pixelfed configuration";
|
||||
peertube.enable = mkEnableOption "default Fediversity PeerTube configuration";
|
||||
|
||||
temp = mkOption {
|
||||
description = "options that are only used while developing; should be removed eventually";
|
||||
default = {};
|
||||
type = types.submodule {
|
||||
options = {
|
||||
cores = mkOption {
|
||||
description = "number of cores; should be obtained from NixOps4";
|
||||
type = types.int;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
internal = mkOption {
|
||||
description = "options that are only meant to be used internally; change at your own risk";
|
||||
default = {};
|
||||
|
|
|
@ -66,6 +66,10 @@ lib.mkIf (config.fediversity.enable && config.fediversity.mastodon.enable) {
|
|||
localDomain = config.fediversity.internal.mastodon.domain;
|
||||
configureNginx = true;
|
||||
|
||||
# from the documentation: recommended is the amount of your CPU cores minus
|
||||
# one. but it also must be a positive integer
|
||||
streamingProcesses = lib.max 1 (config.fediversity.temp.cores - 1);
|
||||
|
||||
# TODO: configure a mailserver so this works
|
||||
smtp = {
|
||||
fromAddress = "noreply@${config.fediversity.internal.mastodon.domain}";
|
||||
|
|
|
@ -8,16 +8,14 @@
|
|||
enable = true;
|
||||
domain = "localhost";
|
||||
mastodon.enable = true;
|
||||
|
||||
temp.cores = config.virtualisation.cores;
|
||||
};
|
||||
|
||||
services.mastodon = {
|
||||
extraConfig = {
|
||||
EMAIL_DOMAIN_ALLOWLIST = "example.com";
|
||||
};
|
||||
|
||||
# from the documentation: recommended is the amount of your CPU cores
|
||||
# minus one. but it also must be a positive integer
|
||||
streamingProcesses = lib.max 1 (config.virtualisation.cores - 1);
|
||||
};
|
||||
|
||||
security.acme = lib.mkVMOverride {
|
||||
|
|
Reference in a new issue