forked from mirrors/nixpkgs
eba8f94069
svn path=/nixos/trunk/; revision=17769
39 lines
715 B
Nix
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";
|
|
};
|
|
|
|
};
|
|
}
|