nixpkgs/modules/services/system/nscd.nix
Eelco Dolstra eba8f94069 * jobAttrs -> jobs.
svn path=/nixos/trunk/; revision=17769
2009-10-12 18:09:34 +00:00

39 lines
715 B
Nix

{pkgs, config, ...}:
let
nssModulesPath = config.system.nssModules.path;
inherit (pkgs.lib) singleton;
in
{
config = {
users.extraUsers = singleton
{ name = "nscd";
uid = config.ids.uids.nscd;
description = "Name service cache daemon user";
};
jobs.nscd =
{ description = "Name Service Cache Daemon";
startOn = "startup";
stopOn = "shutdown";
environment = { LD_LIBRARY_PATH = nssModulesPath; };
preStart =
''
mkdir -m 0755 -p /var/run/nscd
mkdir -m 0755 -p /var/db/nscd
'';
exec = "${pkgs.glibc}/sbin/nscd -f ${./nscd.conf} -d 2> /dev/null";
};
};
}