mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/blocky: allow socket db connection
I am currently working around that with ``` settings.queryLog.target = "postgresql://blocky@127.0.0.1/blocky?sslmode=disable"; ``` but it would be nice to use a socket connection instead
This commit is contained in:
parent
6b0f198fe0
commit
a142420c52
1 changed files with 13 additions and 4 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue