nixos/modules/system/hardware/pipewire/default.nix

31 lines
820 B
Nix
Raw Normal View History

2024-05-25 23:51:37 +02:00
{ config, lib, ... }:
2024-05-25 01:32:48 +02:00
with lib;
let
2024-05-27 22:40:30 +02:00
cfg = config.modules.system.hardware.pipewire;
2024-05-25 01:32:48 +02:00
in
{
2024-05-27 22:40:30 +02:00
options.modules.system.hardware.pipewire = {
2024-05-25 01:32:48 +02:00
enable = mkEnableOption ''
Enable pipewire with my custom configurations
'';
};
config = mkIf cfg.enable {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
};
}