summaryrefslogtreecommitdiffstats
path: root/tv/2configs/pulse.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-01-14 15:48:16 +0100
committertv <tv@krebsco.de>2016-01-14 15:48:16 +0100
commit7c97b64549913863498c4dca214cd9a890a0d00c (patch)
tree38ff92799fec79d18daa7975428f5c9d4a37a7bf /tv/2configs/pulse.nix
parent417cb0a8736780568f9fa67ff32b7d47040ba5e3 (diff)
tv pulse: explain pulseaudio-hack
Diffstat (limited to 'tv/2configs/pulse.nix')
-rw-r--r--tv/2configs/pulse.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index c12c3c531..55ee8d8e4 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
+with lib;
let
pkg = pkgs.pulseaudioLight;
runDir = "/run/pulse";
@@ -35,14 +36,13 @@ let
in
{
- system.activationScripts.pulseaudio-hack = ''
- ln -fns ${clientConf} /etc/pulse/client.conf
- '';
-
environment = {
etc = {
"asound.conf".source = alsaConf;
- #"pulse/client.conf" = lib.mkForce { source = clientConf; };
+ # XXX mkForce is not strong enough (and neither is mkOverride) to create
+ # /etc/pulse/client.conf, see pulseaudio-hack below for a solution.
+ #"pulse/client.conf" = mkForce { source = clientConf; };
+ #"pulse/client.conf".source = mkForce clientConf;
"pulse/default.pa".source = configFile;
};
systemPackages = [ pkg ];
@@ -51,12 +51,15 @@ in
# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;
+ system.activationScripts.pulseaudio-hack = ''
+ ln -fns ${clientConf} /etc/pulse/client.conf
+ '';
+
systemd.services.pulse = {
wantedBy = [ "sound.target" ];
before = [ "sound.target" ];
environment = {
PULSE_RUNTIME_PATH = "${runDir}/home";
- #DISPLAY = ":${toString config.services.xserver.display}";
};
serviceConfig = {
ExecStart = "${pkg}/bin/pulseaudio";