summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-01-14 15:45:41 +0100
committertv <tv@krebsco.de>2016-01-14 15:45:41 +0100
commit417cb0a8736780568f9fa67ff32b7d47040ba5e3 (patch)
tree2de7ad1577c90c251cc47af8702144b4e60c179e /tv
parent8647055f0cc1cd4b4b1b389b3b7c2f4ee2211e93 (diff)
tv pulse: lol tmpfiles
No combination of systemd options could be identified to automatically restart systemd-tmpfiles-setup.service whenever pulse.service gets started, so deploying systemd.services.pulse to a running system will leave pulse.service in a failed state.
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/pulse.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix
index 3db3532d5..c12c3c531 100644
--- a/tv/2configs/pulse.nix
+++ b/tv/2configs/pulse.nix
@@ -35,11 +35,6 @@ let
in
{
- systemd.tmpfiles.rules = [
- "d ${runDir} 0750 pulse pulse - -"
- "d ${runDir}/home 0700 pulse pulse - -"
- ];
-
system.activationScripts.pulseaudio-hack = ''
ln -fns ${clientConf} /etc/pulse/client.conf
'';
@@ -65,6 +60,12 @@ in
};
serviceConfig = {
ExecStart = "${pkg}/bin/pulseaudio";
+ ExecStartPre = pkgs.writeScript "pulse-start" ''
+ #! /bin/sh
+ install -o pulse -g pulse -m 0750 -d ${runDir}
+ install -o pulse -g pulse -m 0700 -d ${runDir}/home
+ '';
+ PermissionsStartOnly = "true";
User = "pulse";
};
};