2022-12-14 23:46:25 +03:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2023-03-27 20:57:06 +03:00
|
|
|
config = lib.mkIf (!config.deviceSpecific.isServer) {
|
|
|
|
services.blueman.enable = !isServer;
|
|
|
|
hardware.bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
# package = pkgs.bluez;
|
|
|
|
};
|
2022-12-14 23:46:25 +03:00
|
|
|
|
2023-03-27 20:57:06 +03:00
|
|
|
# systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [
|
|
|
|
# ""
|
|
|
|
# "${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -E"
|
|
|
|
# ];
|
2022-12-14 23:46:25 +03:00
|
|
|
|
2023-03-27 20:57:06 +03:00
|
|
|
persist.state.directories = [ "/var/lib/bluetooth" ];
|
2022-12-14 23:46:25 +03:00
|
|
|
|
2023-03-27 20:57:06 +03:00
|
|
|
home-manager.users.${config.mainuser}.programs.zsh.shellAliases = let
|
|
|
|
headphones = "D8:37:3B:60:5D:55";
|
|
|
|
in {
|
|
|
|
"hpc" = "bluetoothctl connect ${headphones}";
|
|
|
|
"hpd" = "bluetoothctl disconnect ${headphones}";
|
|
|
|
};
|
2022-12-14 23:46:25 +03:00
|
|
|
};
|
|
|
|
}
|