2007-06-09 22:05:04 +02:00
|
|
|
{stdenv, hal}:
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "hal";
|
|
|
|
|
|
|
|
users = [
|
|
|
|
{ name = "haldaemon";
|
|
|
|
uid = (import ../system/ids.nix).uids.haldaemon;
|
|
|
|
description = "HAL daemon user";
|
2007-06-10 22:13:12 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
groups = [
|
|
|
|
{ name = "haldaemon";
|
|
|
|
gid = (import ../system/ids.nix).gids.haldaemon;
|
2007-06-09 22:05:04 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
extraPath = [hal];
|
|
|
|
|
2008-03-22 17:05:01 +01:00
|
|
|
job = ''
|
|
|
|
description "HAL daemon"
|
2007-06-09 22:05:04 +02:00
|
|
|
|
2009-02-12 00:15:07 +01:00
|
|
|
# !!! TODO: make sure that HAL starts after acpid,
|
|
|
|
# otherwise hald-addon-acpi will grab /proc/acpi/event.
|
2008-03-22 17:05:01 +01:00
|
|
|
start on dbus
|
|
|
|
stop on shutdown
|
2007-06-09 22:05:04 +02:00
|
|
|
|
2008-03-22 17:05:01 +01:00
|
|
|
start script
|
2007-06-09 22:05:04 +02:00
|
|
|
|
2008-03-22 17:05:01 +01:00
|
|
|
# !!! quick hack: wait until dbus has started
|
|
|
|
sleep 3
|
2007-06-09 22:05:04 +02:00
|
|
|
|
2008-03-22 17:05:01 +01:00
|
|
|
mkdir -m 0755 -p /var/cache/hald
|
2007-06-09 22:05:04 +02:00
|
|
|
|
2008-03-22 17:05:01 +01:00
|
|
|
end script
|
|
|
|
|
2008-06-10 18:15:37 +02:00
|
|
|
respawn ${hal}/sbin/hald --daemon=no
|
2008-03-22 17:05:01 +01:00
|
|
|
'';
|
2007-06-09 22:05:04 +02:00
|
|
|
|
|
|
|
}
|