diff options
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/trivmix-service.nix | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index e3eae70e..8c316e67 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix | |||
| @@ -6,40 +6,42 @@ let | |||
| 6 | cfg = config.services.trivmix; | 6 | cfg = config.services.trivmix; |
| 7 | 7 | ||
| 8 | mixerModule = { | 8 | mixerModule = { |
| 9 | connectIn = mkOption { | 9 | options = { |
| 10 | type = with types; coercedTo str singleton (listOf str); | 10 | connectIn = mkOption { |
| 11 | default = []; | 11 | type = with types; coercedTo str singleton (listOf str); |
| 12 | description = "Ports to connect mixer input to"; | 12 | default = []; |
| 13 | }; | 13 | description = "Ports to connect mixer input to"; |
| 14 | }; | ||
| 14 | 15 | ||
| 15 | connectOut = mkOption { | 16 | connectOut = mkOption { |
| 16 | type = with types; coercedTo str singleton (listOf str); | 17 | type = with types; coercedTo str singleton (listOf str); |
| 17 | default = []; | 18 | default = []; |
| 18 | description = "Ports to connect mixer output to"; | 19 | description = "Ports to connect mixer output to"; |
| 19 | }; | 20 | }; |
| 20 | 21 | ||
| 21 | onConnect = mkOption { | 22 | onConnect = mkOption { |
| 22 | type = types.lines; | 23 | type = types.lines; |
| 23 | default = ""; | 24 | default = ""; |
| 24 | description = "Additional shell commands to run after connections are set up"; | 25 | description = "Additional shell commands to run after connections are set up"; |
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | adjustable = mkOption { | 28 | adjustable = mkOption { |
| 28 | type = types.bool; | 29 | type = types.bool; |
| 29 | default = true; | 30 | default = true; |
| 30 | description = "Should the volume on this mixer be adjustable?"; | 31 | description = "Should the volume on this mixer be adjustable?"; |
| 31 | }; | 32 | }; |
| 32 | 33 | ||
| 33 | group = mkOption { | 34 | group = mkOption { |
| 34 | type = types.nullOr types.str; | 35 | type = types.nullOr types.str; |
| 35 | default = null; | 36 | default = null; |
| 36 | description = "Volumes of mixers that share a group name are synchronised"; | 37 | description = "Volumes of mixers that share a group name are synchronised"; |
| 37 | }; | 38 | }; |
| 38 | 39 | ||
| 39 | initial = mkOption { | 40 | initial = mkOption { |
| 40 | type = types.str; | 41 | type = types.str; |
| 41 | default = "1"; | 42 | default = "1"; |
| 42 | description = "Initial volume"; | 43 | description = "Initial volume"; |
| 44 | }; | ||
| 43 | }; | 45 | }; |
| 44 | }; | 46 | }; |
| 45 | 47 | ||
