From 16218b6332c4097374f2b81c86fcb76f50695c88 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 7 Jun 2015 23:10:21 +0200 Subject: insulated derivations --- bragi.nix | 4 ++-- custom/trivmix-service.nix | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bragi.nix b/bragi.nix index 8ba704dc..f1da0748 100644 --- a/bragi.nix +++ b/bragi.nix @@ -93,8 +93,8 @@ }; }; - systemd.services."mpdmix0" = pkgs.callPackage ./custom/trivmix-service.nix { name = "mpdmix0"; connectOut = "system:playback_3"; }; - systemd.services."mpdmix1" = pkgs.callPackage ./custom/trivmix-service.nix { name = "mpdmix1"; connectOut = "system:playback_4"; }; + systemd.services."mpdmix0" = (pkgs.callPackage ./custom/trivmix-service.nix { name = "mpdmix0"; connectOut = "system:playback_3"; }).out; + systemd.services."mpdmix1" = (pkgs.callPackage ./custom/trivmix-service.nix { name = "mpdmix1"; connectOut = "system:playback_4"; }).out; services.mpd = { enable = true; diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index 76b1af6f..da630670 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix @@ -31,12 +31,14 @@ let ''; }; in rec { - wantedBy = [ "sound.target" ]; - requires = [ "jack.service" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${trivmix} --client ${name} --run ${genRun} --dir /run/${name}"; - User = "jack"; - Group = "audio"; + out = { + wantedBy = [ "sound.target" ]; + requires = [ "jack.service" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${trivmix} --client ${name} --run ${genRun} --dir /run/${name}"; + User = "jack"; + Group = "audio"; + }; }; } -- cgit v1.2.3