mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-02-04 09:10:01 +01:00
bicep/synapse: enable auto-compressor timer
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./synapse.nix
|
|
||||||
./synapse-admin.nix
|
./synapse-admin.nix
|
||||||
|
./synapse-auto-compressor.nix
|
||||||
|
./synapse.nix
|
||||||
./element.nix
|
./element.nix
|
||||||
./coturn.nix
|
./coturn.nix
|
||||||
./livekit.nix
|
./livekit.nix
|
||||||
|
|||||||
56
hosts/bicep/services/matrix/synapse-auto-compressor.nix
Normal file
56
hosts/bicep/services/matrix/synapse-auto-compressor.nix
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{ config, lib, utils, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.synapse-auto-compressor;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.synapse-auto-compressor = {
|
||||||
|
# enable = true;
|
||||||
|
postgresUrl = "postgresql://matrix-synapse@/synapse?host=/run/postgresql";
|
||||||
|
};
|
||||||
|
|
||||||
|
# NOTE: nixpkgs has some broken asserts, vendored the entire unit
|
||||||
|
systemd.services.synapse-auto-compressor = {
|
||||||
|
description = "synapse-auto-compressor";
|
||||||
|
requires = [
|
||||||
|
"postgresql.target"
|
||||||
|
];
|
||||||
|
inherit (cfg) startAt;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
DynamicUser = true;
|
||||||
|
User = "matrix-synapse";
|
||||||
|
PrivateTmp = true;
|
||||||
|
ExecStart = utils.escapeSystemdExecArgs [
|
||||||
|
"${cfg.package}/bin/synapse_auto_compressor"
|
||||||
|
"-p"
|
||||||
|
cfg.postgresUrl
|
||||||
|
"-c"
|
||||||
|
cfg.settings.chunk_size
|
||||||
|
"-n"
|
||||||
|
cfg.settings.chunks_to_compress
|
||||||
|
"-l"
|
||||||
|
(lib.concatStringsSep "," (map toString cfg.settings.levels))
|
||||||
|
];
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateMounts = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
RemoveIPC = true;
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
ProcSubset = "pid";
|
||||||
|
ProtectProc = "invisible";
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user