From fd5865d6f7fcd39ab1a1a2c0cb57c98c16e1ae9e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 9 Mar 2017 16:46:33 +0100 Subject: revert to having .out --- bragi.nix | 2 +- custom/trivmix-service.nix | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/bragi.nix b/bragi.nix index 62939d22..a3896b60 100644 --- a/bragi.nix +++ b/bragi.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - trivmixService = opts: pkgs.callPackage ./custom/trivmix-service.nix opts; + trivmixService = opts: (pkgs.callPackage ./custom/trivmix-service.nix opts).out; thermoprint-servant = (pkgs.callPackage ./custom/thermoprint {}).thermoprint-servant; inherit (pkgs) lib; in rec { diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index 04f1634b..e9120f88 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix @@ -24,22 +24,24 @@ let ''; inherit (stdenv.lib) optionalString; in { - wantedBy = [ "sound.target" ]; - requires = [ "jack.service" ]; - before = [ "mpd.service" ]; - serviceConfig = { - Type = "simple"; - ExecStart = ''${trivmix}/bin/trivmix --client ${name} \ - ${optionalString connect "--run ${connectScript}"} \ - ${optionalString (! isNull run) "--run ${run}"} \ - ${optionalString (! isNull initial) "--level ${initial}"} \ - /dev/shm/mix/${name}/level \ - ${optionalString (! isNull group) "/dev/shm/mix/${group}/level"} - ''; - User = "jack"; - Group = "audio"; - Nice = "-10"; - LimitRTPRIO = "95:95"; - LimitMEMLOCK = "infinity"; + out = { + wantedBy = [ "sound.target" ]; + requires = [ "jack.service" ]; + before = [ "mpd.service" ]; + serviceConfig = { + Type = "simple"; + ExecStart = ''${trivmix}/bin/trivmix --client ${name} \ + ${optionalString connect "--run ${connectScript}"} \ + ${optionalString (! isNull run) "--run ${run}"} \ + ${optionalString (! isNull initial) "--level ${initial}"} \ + /dev/shm/mix/${name}/level \ + ${optionalString (! isNull group) "/dev/shm/mix/${group}/level"} + ''; + User = "jack"; + Group = "audio"; + Nice = "-10"; + LimitRTPRIO = "95:95"; + LimitMEMLOCK = "infinity"; + }; }; } -- cgit v1.2.3