nixos/kresd: service nitpicks

This commit is contained in:
Vladimír Čunát 2018-01-09 17:19:13 +01:00
parent 3ab85ed1ac
commit 4bc4c08838
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -72,6 +72,7 @@ in
(iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53") (iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53")
cfg.interfaces; cfg.interfaces;
socketConfig.ListenDatagram = listenStreams; socketConfig.ListenDatagram = listenStreams;
socketConfig.FreeBind = true;
}; };
systemd.sockets.kresd-control = rec { systemd.sockets.kresd-control = rec {
@ -82,7 +83,7 @@ in
socketConfig = { socketConfig = {
FileDescriptorName = "control"; FileDescriptorName = "control";
Service = "kresd.service"; Service = "kresd.service";
SocketMode = "0660"; # only root user/group may connect SocketMode = "0660"; # only root user/group may connect and control kresd
}; };
}; };
@ -95,6 +96,7 @@ in
User = "kresd"; User = "kresd";
Type = "notify"; Type = "notify";
WorkingDirectory = cfg.cacheDir; WorkingDirectory = cfg.cacheDir;
Restart = "on-failure";
}; };
script = '' script = ''