2009-02-20 15:11:07 +00:00
|
|
|
{stdenv, hal, config}:
|
2007-06-09 21:05:04 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "hal";
|
|
|
|
|
|
|
|
users = [
|
|
|
|
{ name = "haldaemon";
|
|
|
|
uid = (import ../system/ids.nix).uids.haldaemon;
|
|
|
|
description = "HAL daemon user";
|
2007-06-10 21:13:12 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
groups = [
|
|
|
|
{ name = "haldaemon";
|
|
|
|
gid = (import ../system/ids.nix).gids.haldaemon;
|
2007-06-09 21:05:04 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
extraPath = [hal];
|
|
|
|
|
2008-03-22 16:05:01 +00:00
|
|
|
job = ''
|
|
|
|
description "HAL daemon"
|
2007-06-09 21:05:04 +01:00
|
|
|
|
2009-02-11 23:15:07 +00:00
|
|
|
# !!! TODO: make sure that HAL starts after acpid,
|
|
|
|
# otherwise hald-addon-acpi will grab /proc/acpi/event.
|
2009-02-20 15:11:07 +00:00
|
|
|
start on ${if config.powerManagement.enable then "acpid" else "dbus"}
|
2008-03-22 16:05:01 +00:00
|
|
|
stop on shutdown
|
2007-06-09 21:05:04 +01:00
|
|
|
|
2008-03-22 16:05:01 +00:00
|
|
|
start script
|
2007-06-09 21:05:04 +01:00
|
|
|
|
2008-03-22 16:05:01 +00:00
|
|
|
mkdir -m 0755 -p /var/cache/hald
|
2007-06-09 21:05:04 +01:00
|
|
|
|
2009-04-28 00:09:25 +01:00
|
|
|
rm -f /var/cache/hald/fdi-cache
|
|
|
|
|
2008-03-22 16:05:01 +00:00
|
|
|
end script
|
|
|
|
|
2008-06-10 17:15:37 +01:00
|
|
|
respawn ${hal}/sbin/hald --daemon=no
|
2008-03-22 16:05:01 +00:00
|
|
|
'';
|
2007-06-09 21:05:04 +01:00
|
|
|
|
|
|
|
}
|