nixos-config/profiles/bluetooth.nix
2023-11-11 03:10:27 +03:00

22 lines
583 B
Nix

{ config, pkgs, lib, ... }: {
config = lib.mkIf (!config.deviceSpecific.isServer) {
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
# package = pkgs.bluez;
settings = {
General = { Experimental = true; };
};
};
persist.state.directories = [ "/var/lib/bluetooth" ];
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}";
};
};
}