Skip to content

Commit 19f22fd

Browse files
committed
nixos/hickory-dns: Use systemd Type=notify for watchdog functionality
1 parent a08c086 commit 19f22fd

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

nixos/modules/services/networking/hickory-dns.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ in
178178
''
179179
${lib.getExe cfg.package} --config ${cfg.configFile} ${flagsStr}
180180
'';
181-
Type = "simple";
181+
Type = "notify";
182+
WatchdogSec = 30;
182183
Restart = "on-failure";
183184
RestartSec = "10s";
184185
DynamicUser = true;
@@ -204,7 +205,11 @@ in
204205
ProtectProc = "invisible";
205206
ProtectSystem = "full";
206207
RemoveIPC = true;
207-
RestrictAddressFamilies = [ "AF_INET AF_INET6" ];
208+
RestrictAddressFamilies = [
209+
"AF_INET"
210+
"AF_INET6"
211+
"AF_UNIX"
212+
];
208213
RestrictNamespaces = true;
209214
RestrictSUIDSGID = true;
210215
SystemCallArchitectures = "native";

0 commit comments

Comments
 (0)