1
Fork 0

Set up bluetooth audio

This commit is contained in:
prescientmoon 2024-02-29 12:44:52 +01:00
parent c26a8a2c9b
commit be352ef463
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
6 changed files with 24 additions and 18 deletions

View file

@ -0,0 +1,4 @@
{
# Makes bluetooth media controls work
services.mpris-proxy.enable = true;
}

View file

@ -22,6 +22,8 @@ let
});
in
{
imports = [ ./audio.nix ];
programs.spicetify = {
enable = true;

View file

@ -0,0 +1,5 @@
# https://nixos.wiki/wiki/Bluetooth
{
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
}

View file

@ -11,22 +11,15 @@
jack.enable = true;
};
# Volume controls
environment.shellAliases =
let
pactl = "${pkgs.pulseaudio}/bin/pactl";
volume = amount: "${pactl} set-sink-volume @DEFAULT_SINK@ ${amount}";
in
{
# Relative
"v-down" = volume "-5%";
"v-up" = volume "+5%";
# Absolute
"v-min" = volume "0%";
"v-low" = volume "25%";
"v-mid" = volume "50%";
"v-high" = volume "75%";
"v-max" = volume "100%";
# https://nixos.wiki/wiki/PipeWire
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
}

View file

@ -2,4 +2,5 @@
{ pkgs, ... }: {
programs.hyprland.enable = true;
programs.hyprland.package = pkgs.hyprland;
services.udev.packages = [ pkgs.swayosd ];
}

View file

@ -5,6 +5,7 @@
../common/users/adrielus.nix
../common/optional/pipewire.nix
../common/optional/bluetooth.nix
../common/optional/greetd.nix
../common/optional/quietboot.nix
../common/optional/desktop/steam.nix