-
-
Save benpye/f43ed72447bb59ca34a66a1265a1655e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd.services.coredns = { | |
after = [ "network.target" ]; | |
wantedBy = [ "multi-user.target" ]; | |
serviceConfig = { | |
ExecStart = | |
let configFile = pkgs.writeText "Corefile" | |
'' //STUFF | |
''; | |
in | |
"${pkgs.coredns}/bin/coredns -conf=${configFile}"; | |
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; | |
Type = "simple"; | |
User = "coredns"; | |
Group = "coredns"; | |
Restart = "on-failure"; | |
StartLimitInterval = 86400; | |
StartLimitBurst = 5; | |
AmbientCapabilities = "cap_net_bind_service"; | |
CapabilityBoundingSet = "cap_net_bind_service"; | |
NoNewPrivileges = true; | |
LimitNPROC = 64; | |
LimitNOFILE = 1048576; | |
PrivateTmp = true; | |
PrivateDevices = true; | |
ProtectHome = true; | |
ProtectSystem = "strict"; | |
ReadWriteDirectories = cfg.dataDir; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment