mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
easyeffects: use new typecheck (#8090)
This commit is contained in:
parent
97e3022a8d
commit
4ac96eb21c
1 changed files with 8 additions and 11 deletions
|
|
@ -17,17 +17,14 @@ let
|
||||||
let
|
let
|
||||||
baseType = types.attrsOf jsonFormat.type;
|
baseType = types.attrsOf jsonFormat.type;
|
||||||
in
|
in
|
||||||
baseType
|
types.addCheck baseType (
|
||||||
// {
|
v:
|
||||||
check =
|
baseType.check v
|
||||||
v:
|
&& lib.elem (lib.head (lib.attrNames v)) [
|
||||||
baseType.check v
|
"input"
|
||||||
&& lib.elem (lib.head (lib.attrNames v)) [
|
"output"
|
||||||
"input"
|
]
|
||||||
"output"
|
);
|
||||||
];
|
|
||||||
description = "EasyEffects input or output JSON preset";
|
|
||||||
};
|
|
||||||
|
|
||||||
presetOptionType = mkOption {
|
presetOptionType = mkOption {
|
||||||
type = types.nullOr (types.attrsOf presetType);
|
type = types.nullOr (types.attrsOf presetType);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue