diff options
author | tv <tv@krebsco.de> | 2016-01-14 15:48:16 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-01-14 15:48:16 +0100 |
commit | 6af17b1d4239199001f4d0b1ae0136d0e06910bd (patch) | |
tree | 40da888edc3f2009e69ca3e4d95daa83f33fdf16 /tv/2configs | |
parent | d48eb6a286d33d2867b636d7348e7d42e845bbca (diff) |
tv pulse: explain pulseaudio-hack
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/pulse.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index c12c3c5..55ee8d8 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"; |