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
commitd48eb6a286d33d2867b636d7348e7d42e845bbca (patch)
treef982ebce71725668c078f6d9a9ed54ac36e106cc /tv
parentc9a0791bcd5c7ea1de0baec4a373d9a70522859a (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 3db3532..c12c3c5 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";
};
};