2021-11-24 22:05:33 +04:00
|
|
|
{ pkgs, lib, config, ... }: {
|
2021-11-23 12:33:00 +04:00
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.bluezFull;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [
|
|
|
|
""
|
|
|
|
"${pkgs.bluezFull}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -E"
|
|
|
|
];
|
|
|
|
|
|
|
|
persist.state.directories = [ "/var/lib/bluetooth" ];
|
2021-11-24 22:05:33 +04:00
|
|
|
home-manager.users.balsoft = let headphones = "CC:98:8B:C0:FC:D2";
|
|
|
|
in {
|
|
|
|
programs.zsh.shellAliases = {
|
|
|
|
"hpc" = "bluetoothctl connect ${headphones}";
|
|
|
|
"hpd" = "bluetoothctl disconnect ${headphones}";
|
|
|
|
};
|
|
|
|
|
|
|
|
wayland.windowManager.sway.config.keybindings = let
|
|
|
|
inherit (config.home-manager.users.balsoft.wayland.windowManager.sway.config)
|
|
|
|
modifier;
|
|
|
|
in {
|
|
|
|
"${modifier}+F2" = "exec bluetoothctl connect ${headphones}";
|
|
|
|
"${modifier}+Shift+F2" = "exec bluetoothctl disconnect ${headphones}";
|
|
|
|
};
|
|
|
|
};
|
2021-11-23 12:33:00 +04:00
|
|
|
}
|