From 9f3f926a2efab1ae46213e60acfa0760075d5619 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 3 Sep 2017 23:40:36 +0200 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/trivmix-service.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'custom') diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index 6a50224d..e3eae70e 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix @@ -7,13 +7,13 @@ let mixerModule = { connectIn = mkOption { - type = with types; either str (listOf str); + type = with types; coercedTo str singleton (listOf str); default = []; description = "Ports to connect mixer input to"; }; connectOut = mkOption { - type = with types; either str (listOf str); + type = with types; coercedTo str singleton (listOf str); default = []; description = "Ports to connect mixer output to"; }; @@ -43,12 +43,7 @@ let }; }; - service = name: mixerCfg: let - connectIn = if isList mixerCfg.connectIn then mixerCfg.connectIn else singleton mixerCfg.connectIn; - connectOut = if isList mixerCfg.connectOut then mixerCfg.connectOut else singleton mixerCfg.connectOut; - - inherit (mixerCfg) onConnect adjustable group initial; - + service = name: mixerCfg: with mixerCfg; let connectScript = '' #!${pkgs.stdenv.shell} -- cgit v1.2.3