machines/biotite: add matrix-synapse and backup

This commit is contained in:
xinyangli 2024-12-03 16:37:42 +08:00
parent 83f7700949
commit bf74a01049
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
6 changed files with 224 additions and 2 deletions

View file

@ -1,4 +1,5 @@
{
pkgs,
lib,
...
}:
@ -7,6 +8,8 @@
imports = [
./hardware-configurations.nix
./services/gotosocial.nix
./services/synapse.nix
./services/restic.nix
];
networking.hostName = "biotite";
@ -43,6 +46,37 @@
services.caddy.enable = true;
services.tailscale.enable = true;
services.postgresql = {
enable = true;
package = pkgs.postgresql_17;
settings = {
allow_alter_system = false;
# DB Version: 17
# OS Type: linux
# DB Type: mixed
# Total Memory (RAM): 8 GB
# CPUs num: 4
# Data Storage: ssd
max_connections = 100;
shared_buffers = "2GB";
effective_cache_size = "6GB";
maintenance_work_mem = "512MB";
checkpoint_completion_target = 0.9;
wal_buffers = "16MB";
default_statistics_target = 100;
random_page_cost = 1.1;
effective_io_concurrency = 200;
work_mem = "5242kB";
huge_pages = "off";
min_wal_size = "1GB";
max_wal_size = "4GB";
max_worker_processes = 4;
max_parallel_workers_per_gather = 2;
max_parallel_workers = 4;
max_parallel_maintenance_workers = 2;
};
};
users.users.root.hashedPassword = "$y$j9T$NToEZWJBONjSgRnMd9Ur9/$o6n7a9b8eUILQz4d37oiHCCVnDJ8hZTZt.c.37zFfU.";
system.stateVersion = "24.11";