2023-12-02 00:46:56 +01:00
|
|
|
# This handles audio stuff
|
2023-05-28 02:00:10 +02:00
|
|
|
{ pkgs, ... }: {
|
2023-01-10 02:38:06 +01:00
|
|
|
security.rtkit.enable = true;
|
|
|
|
hardware.pulseaudio.enable = false;
|
2023-05-28 02:00:10 +02:00
|
|
|
|
2023-01-10 02:38:06 +01:00
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Volume controls
|
2023-05-28 02:00:10 +02:00
|
|
|
environment.shellAliases =
|
2023-12-02 00:46:56 +01:00
|
|
|
let
|
|
|
|
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
|
|
|
volume = amount: "${pactl} set-sink-volume @DEFAULT_SINK@ ${amount}";
|
2023-05-28 02:00:10 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
# Relative
|
2023-12-02 00:46:56 +01:00
|
|
|
"v-down" = volume "-5%";
|
|
|
|
"v-up" = volume "+5%";
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-05-28 02:00:10 +02:00
|
|
|
# Absolute
|
2023-12-02 00:46:56 +01:00
|
|
|
"v-min" = volume "0%";
|
|
|
|
"v-low" = volume "25%";
|
|
|
|
"v-mid" = volume "50%";
|
|
|
|
"v-high" = volume "75%";
|
|
|
|
"v-max" = volume "100%";
|
2023-05-28 02:00:10 +02:00
|
|
|
};
|
2023-01-10 02:38:06 +01:00
|
|
|
}
|