2009-08-10 19:25:09 +01:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
|
|
|
jobs = pkgs.lib.singleton
|
|
|
|
{ name = "bluetoothd";
|
|
|
|
|
2009-08-11 22:06:17 +01:00
|
|
|
startOn = "dbus/started";
|
|
|
|
stopOn = "dbus/stop";
|
2009-08-10 19:25:09 +01:00
|
|
|
|
|
|
|
preStart =
|
|
|
|
''
|
|
|
|
mkdir -m 0755 -p /var/lib/bluetooth
|
|
|
|
'';
|
|
|
|
|
|
|
|
exec = "${pkgs.bluez}/sbin/bluetoothd --nodaemon --debug";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [pkgs.bluez pkgs.openobex pkgs.obexftp];
|
|
|
|
|
|
|
|
services.dbus.enable = true;
|
|
|
|
services.dbus.packages = [pkgs.bluez];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|