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
|
||||
{
|
||||
imports = [ ./audio.nix ];
|
||||
|
||||
programs.spicetify = {
|
||||
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;
|
||||
};
|
||||
|
||||
# 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 ]"
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.package = pkgs.hyprland;
|
||||
services.udev.packages = [ pkgs.swayosd ];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue