config/modules/gui/pulseaudio.nix

21 lines
426 B
Nix

{ pkgs, lib, config, ... }:
let gui = config.custom.gui; in
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
];
};
}