config/modules/gui/pulseaudio.nix

22 lines
426 B
Nix
Raw Normal View History

{ pkgs, lib, config, ... }:
2022-01-12 00:20:57 +01:00
let gui = config.custom.gui; in
2022-01-12 00:20:57 +01:00
with lib; {
# Define pulseaudio toggle under the `audio` option set.
options.custom.gui.audio.pulseaudio = mkEnableOption "PulseAudio sound server";
config = mkIf (gui.audio.pulseaudio) {
sound.enable = true;
hardware.pulseaudio.enable = true;
users.users."riley".packages = with pkgs; [
pavucontrol
];
};
}