diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-09-03 22:52:40 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-09-03 22:52:40 +0200 |
commit | f7f1c1771df4be36bc6cc089d551bcd72c91217b (patch) | |
tree | 70fc6c9c3bf6d1f0e4e0b889a74cd7ed97dea8d7 | |
parent | dd57c1a30ac10312238221bb398df74317e72801 (diff) | |
download | nixos-f7f1c1771df4be36bc6cc089d551bcd72c91217b.tar nixos-f7f1c1771df4be36bc6cc089d551bcd72c91217b.tar.gz nixos-f7f1c1771df4be36bc6cc089d551bcd72c91217b.tar.bz2 nixos-f7f1c1771df4be36bc6cc089d551bcd72c91217b.tar.xz nixos-f7f1c1771df4be36bc6cc089d551bcd72c91217b.zip |
mixer dependencies
-rw-r--r-- | bragi.nix | 3 | ||||
-rw-r--r-- | custom/trivmix-service.nix | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -167,6 +167,9 @@ in rec { | |||
167 | speakers1 = { connectOut = "system:playback_8"; connectIn = "outnode1:out"; group = "speakers"; initial = "0"; }; | 167 | speakers1 = { connectOut = "system:playback_8"; connectIn = "outnode1:out"; group = "speakers"; initial = "0"; }; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | systemd.services.mpdmix0.requiredBy = [ "mpd.service" ]; | ||
171 | systemd.services.mpdmix1.requiredBy = [ "mpd.service" ]; | ||
172 | |||
170 | services.mpd = { | 173 | services.mpd = { |
171 | enable = true; | 174 | enable = true; |
172 | musicDirectory = "/media/odin/music"; | 175 | musicDirectory = "/media/odin/music"; |
diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index a0c46db6..985ded80 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix | |||
@@ -56,9 +56,11 @@ let | |||
56 | ''; | 56 | ''; |
57 | 57 | ||
58 | connect = (connectOut != []) || (connectIn != []) || (onConnect != []); | 58 | connect = (connectOut != []) || (connectIn != []) || (onConnect != []); |
59 | |||
60 | mixerDeps = filter (x: any (hasPrefix (x + ":")) connectIn || any (hasPrefix (x + ":")) connectOut) (attrNames cfg); | ||
59 | in { | 61 | in { |
60 | wantedBy = [ "sound.target" ]; | 62 | wantedBy = [ "sound.target" ]; |
61 | requires = [ "jack.service" ]; | 63 | requires = [ "jack.service" ] ++ map (n: n + ".service") mixerDeps; |
62 | path = with pkgs; [ jack2Full ]; | 64 | path = with pkgs; [ jack2Full ]; |
63 | serviceConfig = { | 65 | serviceConfig = { |
64 | Type = "simple"; | 66 | Type = "simple"; |