6663af0833
running by the time the job has finished starting. This obviates the need for the sleep hack in other jobs. svn path=/nixos/trunk/; revision=14875
38 lines
699 B
Nix
38 lines
699 B
Nix
{stdenv, hal, config}:
|
|
|
|
{
|
|
name = "hal";
|
|
|
|
users = [
|
|
{ name = "haldaemon";
|
|
uid = (import ../system/ids.nix).uids.haldaemon;
|
|
description = "HAL daemon user";
|
|
}
|
|
];
|
|
|
|
groups = [
|
|
{ name = "haldaemon";
|
|
gid = (import ../system/ids.nix).gids.haldaemon;
|
|
}
|
|
];
|
|
|
|
extraPath = [hal];
|
|
|
|
job = ''
|
|
description "HAL daemon"
|
|
|
|
# !!! TODO: make sure that HAL starts after acpid,
|
|
# otherwise hald-addon-acpi will grab /proc/acpi/event.
|
|
start on ${if config.powerManagement.enable then "acpid" else "dbus"}
|
|
stop on shutdown
|
|
|
|
start script
|
|
|
|
mkdir -m 0755 -p /var/cache/hald
|
|
|
|
end script
|
|
|
|
respawn ${hal}/sbin/hald --daemon=no
|
|
'';
|
|
|
|
}
|