mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
Merge pull request #204653 from ymatsiuk/ymatsiuk/bluetooth
nixos/bluetooth: add input and network service configs
This commit is contained in:
commit
c956f85fbd
@ -71,6 +71,29 @@ in
|
||||
};
|
||||
description = lib.mdDoc "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
|
||||
};
|
||||
|
||||
input = mkOption {
|
||||
type = cfgFmt.type;
|
||||
default = { };
|
||||
example = {
|
||||
General = {
|
||||
IdleTimeout = 30;
|
||||
ClassicBondedOnly = true;
|
||||
};
|
||||
};
|
||||
description = lib.mdDoc "Set configuration for the input service (/etc/bluetooth/input.conf).";
|
||||
};
|
||||
|
||||
network = mkOption {
|
||||
type = cfgFmt.type;
|
||||
default = { };
|
||||
example = {
|
||||
General = {
|
||||
DisableSecurity = true;
|
||||
};
|
||||
};
|
||||
description = lib.mdDoc "Set configuration for the network service (/etc/bluetooth/network.conf).";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -80,6 +103,10 @@ in
|
||||
environment.systemPackages = [ package ]
|
||||
++ optional cfg.hsphfpd.enable pkgs.hsphfpd;
|
||||
|
||||
environment.etc."bluetooth/input.conf".source =
|
||||
cfgFmt.generate "input.conf" cfg.input;
|
||||
environment.etc."bluetooth/network.conf".source =
|
||||
cfgFmt.generate "network.conf" cfg.network;
|
||||
environment.etc."bluetooth/main.conf".source =
|
||||
cfgFmt.generate "main.conf" (recursiveUpdate defaults cfg.settings);
|
||||
services.udev.packages = [ package ];
|
||||
|
@ -130,6 +130,10 @@ in stdenv.mkDerivation rec {
|
||||
mkdir $out/etc/bluetooth
|
||||
ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/204418
|
||||
ln -s /etc/bluetooth/input.conf $out/etc/bluetooth/input.conf
|
||||
ln -s /etc/bluetooth/network.conf $out/etc/bluetooth/network.conf
|
||||
|
||||
# Add missing tools, ref https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/bluez
|
||||
for files in `find tools/ -type f -perm -755`; do
|
||||
filename=$(basename $files)
|
||||
|
Loading…
Reference in New Issue
Block a user