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 in
{ {
imports = [ ./audio.nix ];
programs.spicetify = { programs.spicetify = {
enable = true; 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; jack.enable = true;
}; };
# Volume controls # https://nixos.wiki/wiki/PipeWire
environment.shellAliases = environment.etc = {
let "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
pactl = "${pkgs.pulseaudio}/bin/pactl"; bluez_monitor.properties = {
volume = amount: "${pactl} set-sink-volume @DEFAULT_SINK@ ${amount}"; ["bluez5.enable-sbc-xq"] = true,
in ["bluez5.enable-msbc"] = true,
{ ["bluez5.enable-hw-volume"] = true,
# Relative ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
"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%";
};
} }

View file

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

View file

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