nix-config/nixosModules/system/audio.nix

29 lines
492 B
Nix
Raw Normal View History

2024-10-06 11:00:01 +02:00
{
config,
lib,
...
}:
let
2024-10-06 11:00:01 +02:00
cfg = config.krop.audio;
in
{
2024-10-06 11:00:01 +02:00
options.krop.audio = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Enable audio";
};
};
config = lib.mkIf cfg.enable {
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}