Set up bluetooth audio
This commit is contained in:
parent
c26a8a2c9b
commit
be352ef463
4
home/features/desktop/audio.nix
Normal file
4
home/features/desktop/audio.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
# Makes bluetooth media controls work
|
||||||
|
services.mpris-proxy.enable = true;
|
||||||
|
}
|
|
@ -22,6 +22,8 @@ let
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ ./audio.nix ];
|
||||||
|
|
||||||
programs.spicetify = {
|
programs.spicetify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
5
hosts/nixos/common/optional/bluetooth.nix
Normal file
5
hosts/nixos/common/optional/bluetooth.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# https://nixos.wiki/wiki/Bluetooth
|
||||||
|
{
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
}
|
|
@ -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%";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue