summaryrefslogtreecommitdiffstats
path: root/tv/2configs/pulse.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-13 00:49:59 +0200
committerlassulus <lassulus@lassul.us>2017-07-13 00:49:59 +0200
commit772f8dd3efca3a1a966c6fb9abbc72063124fe9d (patch)
treef6eae67ef2df2fe520b6acd8a05e1c684fe03174 /tv/2configs/pulse.nix
parentad419018004b7da735e6d001f4b7bf89bca7e528 (diff)
parentbc6c6a3164d31141f39333914c1b15ff261e7859 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs/pulse.nix')
-rw-r--r--tv/2configs/pulse.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index 418551213..c051b4261 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -1,16 +1,25 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, pkgs_i686, ... }:
with import <stockholm/lib>;
let
pkg = pkgs.pulseaudioLight;
runDir = "/run/pulse";
+ support32Bit =
+ pkgs.stdenv.isx86_64 &&
+ pkgs_i686.alsaLib != null &&
+ pkgs_i686.libpulseaudio != null;
+
alsaConf = pkgs.writeText "asound.conf" ''
ctl_type.pulse {
libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;
+ ${optionalString support32Bit
+ "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so;"}
}
pcm_type.pulse {
libs.native = ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;
+ ${optionalString support32Bit
+ "libs.32Bit = ${pkgs_i686.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so;"}
}
ctl.!default {
type pulse
@@ -52,6 +61,10 @@ in
];
};
+ hardware.pulseaudio = {
+ inherit support32Bit;
+ };
+
# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;