summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/trivmix-service.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix
index 2957bf01..218d8d5f 100644
--- a/custom/trivmix-service.nix
+++ b/custom/trivmix-service.nix
@@ -57,24 +57,24 @@ let
57 connect = (connectOut != []) || (connectIn != []) || (onConnect != []); 57 connect = (connectOut != []) || (connectIn != []) || (onConnect != []);
58 58
59 mixerDeps = filter (x: any (hasPrefix (x + ":")) connectIn || any (hasPrefix (x + ":")) connectOut) (attrNames cfg); 59 mixerDeps = filter (x: any (hasPrefix (x + ":")) connectIn || any (hasPrefix (x + ":")) connectOut) (attrNames cfg);
60
61 trivmixArgs = [ "--client" name "--level" initial ]
62 ++ optionals connect ["--run" connectScript]
63 ++ optional (adjustable && isNull group) "/dev/shm/mix/${name}/level"
64 ++ optional (! isNull group) "/dev/shm/mix/${group}/level";
60 in { 65 in {
61 wantedBy = [ "sound.target" ]; 66 wantedBy = [ "sound.target" ];
62 requires = [ "jack.service" ] ++ map (n: n + ".service") mixerDeps; 67 requires = [ "jack.service" ] ++ map (n: n + ".service") mixerDeps;
63 path = with pkgs; [ jack2Full ]; 68 path = with pkgs; [ jack2Full trivmix ];
64 serviceConfig = { 69 serviceConfig = {
65 Type = "notify"; 70 Type = "notify";
66 ExecStart = ''${pkgs.trivmix}/bin/trivmix --client ${name} \
67 ${optionalString connect "--run ${connectScript}"} \
68 "--level ${initial}" \
69 ${optionalString (adjustable && isNull group) "/dev/shm/mix/${name}/level"} \
70 ${optionalString (! isNull group) "/dev/shm/mix/${group}/level"}
71 '';
72 User = "jack"; 71 User = "jack";
73 Group = "audio"; 72 Group = "audio";
74 Nice = "-10"; 73 Nice = "-10";
75 LimitRTPRIO = "95:95"; 74 LimitRTPRIO = "95:95";
76 LimitMEMLOCK = "infinity"; 75 LimitMEMLOCK = "infinity";
77 }; 76 };
77 script = "trivmix ${escapeShellArgs trivmixArgs}";
78 }; 78 };
79in { 79in {
80 options.services.trivmix = mkOption { 80 options.services.trivmix = mkOption {