diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/trivmix-service.nix | 11 |
1 files changed, 3 insertions, 8 deletions
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 | |||
7 | 7 | ||
8 | mixerModule = { | 8 | mixerModule = { |
9 | connectIn = mkOption { | 9 | connectIn = mkOption { |
10 | type = with types; either str (listOf str); | 10 | type = with types; coercedTo str singleton (listOf str); |
11 | default = []; | 11 | default = []; |
12 | description = "Ports to connect mixer input to"; | 12 | description = "Ports to connect mixer input to"; |
13 | }; | 13 | }; |
14 | 14 | ||
15 | connectOut = mkOption { | 15 | connectOut = mkOption { |
16 | type = with types; either str (listOf str); | 16 | type = with types; coercedTo str singleton (listOf str); |
17 | default = []; | 17 | default = []; |
18 | description = "Ports to connect mixer output to"; | 18 | description = "Ports to connect mixer output to"; |
19 | }; | 19 | }; |
@@ -43,12 +43,7 @@ let | |||
43 | }; | 43 | }; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | service = name: mixerCfg: let | 46 | service = name: mixerCfg: with mixerCfg; let |
47 | connectIn = if isList mixerCfg.connectIn then mixerCfg.connectIn else singleton mixerCfg.connectIn; | ||
48 | connectOut = if isList mixerCfg.connectOut then mixerCfg.connectOut else singleton mixerCfg.connectOut; | ||
49 | |||
50 | inherit (mixerCfg) onConnect adjustable group initial; | ||
51 | |||
52 | connectScript = '' | 47 | connectScript = '' |
53 | #!${pkgs.stdenv.shell} | 48 | #!${pkgs.stdenv.shell} |
54 | 49 | ||