mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
dc352536a8
(systemd service descriptions that is, not service descriptions in "man configuration.nix".) Capitalizing each word in the description seems to be the accepted standard. Also shorten these descriptions: * "Munin node, the agent process" => "Munin Node" * "Planet Venus, an awesome ‘river of news’ feed reader" => "Planet Venus Feed Reader"
43 lines
777 B
Nix
43 lines
777 B
Nix
{ config, pkgs, ... }:
|
|
|
|
with pkgs.lib;
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
hardware.bluetooth.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Whether to enable support for Bluetooth.";
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf config.hardware.bluetooth.enable {
|
|
|
|
environment.systemPackages = [ pkgs.bluez pkgs.openobex pkgs.obexftp ];
|
|
|
|
services.udev.packages = [ pkgs.bluez ];
|
|
|
|
services.dbus.packages = [ pkgs.bluez ];
|
|
|
|
systemd.services."dbus-org.bluez" = {
|
|
description = "Bluetooth Service";
|
|
serviceConfig = {
|
|
Type = "dbus";
|
|
BusName = "org.bluez";
|
|
ExecStart = "${pkgs.bluez}/sbin/bluetoothd -n";
|
|
};
|
|
wantedBy = [ "bluetooth.target" ];
|
|
};
|
|
|
|
};
|
|
|
|
}
|