aboutsummaryrefslogtreecommitdiff
path: root/modules/nixos/hardware/audio/default.nix
blob: d2bfa9649fb9622031b11dbd8724224a6673adde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ options, config, lib, pkgs, namespace, ... }:

with lib; with lib.${namespace}; let
  cfg = config.${namespace}.hardware.audio;
in {
  options.${namespace}.hardware.audio = with types; {
    enable = mkEnableOption "audio support";
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      pulseaudio
    ];

    security.rtkit.enable = true;
    services.pipewire = {
      enable = true;

      pulse.enable = true;
      alsa.enable = true;
      alsa.support32Bit = true;
      #jack.enable = true;
    };
  };
}