nixos-config/modules/nixos/system/hardware/audio/default.nix
2024-03-26 18:48:58 +01:00

33 lines
636 B
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.system.hardware.audio;
in
{
options.wyrdgard.system.hardware.audio = with types; {
enable = mkBoolOpt false "Whether or not to enable audio";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
noisetorch
];
programs.noisetorch.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}