mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
83a9bf9a6a
(e.g., startOn = "started foo" instead of startOn = "foo"). svn path=/nixos/branches/upstart-0.6/; revision=18230
38 lines
686 B
Nix
38 lines
686 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";
|
|
|
|
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";
|
|
};
|
|
|
|
};
|
|
}
|