services.beesd: set hashTableSizeMB

This commit is contained in:
2023-09-29 10:21:49 +08:00
parent 3f54c4256c
commit 9eec3611d4
2 changed files with 44 additions and 6 deletions

View File

@@ -215,7 +215,11 @@
nginx = { enable = true; transparentProxy.externalIp = [ "192.168.82.3" ]; };
misskey = { enable = true; hostname = "xn--qbtm095lrg0bfka60z.chn.moe"; };
misskey-proxy."xn--qbtm095lrg0bfka60z.chn.moe" = {};
beesd = { enable = true; instances = { root = "/"; boot = "/boot"; }; };
beesd =
{
enable = true;
instances = { root = "/"; boot = { device = "/boot"; hashTableSizeMB = 16; }; };
};
};
bugs =
[
@@ -300,7 +304,15 @@
coturn.enable = true;
synapse-proxy."synapse.chn.moe".upstream.address = "internal.vps7.chn.moe";
vaultwarden-proxy = { enable = true; upstream.address = "internal.vps7.chn.moe"; };
beesd = { enable = true; instances = { root = "/"; boot = "/boot"; }; };
beesd =
{
enable = true;
instances =
{
root = { device = "/"; hashTableSizeMB = 32; };
boot = { device = "/boot"; hashTableSizeMB = 16; };
};
};
};
};})
];
@@ -363,7 +375,11 @@
vaultwarden.enable = true;
vaultwarden-proxy.enable = true;
meilisearch.ioLimitDevice = "/dev/mapper/root";
beesd = { enable = true; instances = { root = "/"; boot = "/boot"; }; };
beesd =
{
enable = true;
instances = { root = "/"; boot = { device = "/boot"; hashTableSizeMB = 16; }; };
};
};
};})
];
@@ -440,7 +456,16 @@
xrdp = { enable = true; hostname = [ "nas.chn.moe" "office.chn.moe" ]; };
groupshare.enable = true;
smartd.enable = true;
beesd = { enable = true; instances = { root = "/"; boot = "/boot"; nix = "/nix"; }; };
beesd =
{
enable = true;
instances =
{
root = { device = "/"; hashTableSizeMB = 4096; };
boot = { device = "/boot"; hashTableSizeMB = 16; };
nix = { device = "/nix"; hashTableSizeMB = 128; };
};
};
};
users.users = [ "root" "chn" "xll" "zem" "yjq" "yxy" ];
};})

View File

@@ -3,7 +3,19 @@ inputs:
options.nixos.services.beesd = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
instances = mkOption { type = types.attrsOf types.string; default = {}; };
instances = mkOption
{
type = types.attrsOf (types.oneOf
[
types.nonEmptyStr
(types.submodule { options =
{
device = mkOption { type = types.nonEmptyStr; };
hashTableSizeMB = mkOption { type = types.int; default = 1024; };
};})
]);
default = {};
};
};
config =
let
@@ -19,7 +31,8 @@ inputs:
inherit (instance) name;
value =
{
spec = instance.value;
spec = instance.value.device or instance.value;
hashTableSizeMB = instance.value.hashTableSizeMB or 1024;
extraOptions = [ "--thread-count" "1" ];
};
})