{ pkgs
, lib
, config
, ...
}:

let
  inherit (lib) mkOption mkIf types;
  cfg = config.services.pipewire;
in {

  options.services.pipewire.full = mkOption {
    type = types.bool;
    default = false;
  };

  config = mkIf cfg.full {
    # sound.enable = true;
    # hardware.pulseaudio.enable = false;
    security.rtkit.enable = true;
    services.pipewire = {
      enable = true;
      alsa.enable = true;
      alsa.support32Bit = true;
      pulse.enable = true;
      jack.enable = true;
      wireplumber.enable = true;
    };
  };

}
