nixos/blocky: allow socket db connection (#492411)

This commit is contained in:
Sandro 2026-03-04 02:24:17 +00:00 committed by GitHub
commit 71331ce7ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,10 +64,19 @@ in
ProtectKernelTunables = true;
ProtectSystem = "strict";
Restart = "on-failure";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictAddressFamilies =
let
logType = lib.attrByPath [ "settings" "queryLog" "type" ] "" cfg;
in
(lib.optional (lib.elem logType [
"mysql"
"postgresql"
"timescale"
]) "AF_UNIX")
++ [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RuntimeDirectory = "blocky";