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
|
||||
baseType = types.attrsOf jsonFormat.type;
|
||||
in
|
||||
baseType
|
||||
// {
|
||||
check =
|
||||
v:
|
||||
baseType.check v
|
||||
&& lib.elem (lib.head (lib.attrNames v)) [
|
||||
"input"
|
||||
"output"
|
||||
];
|
||||
description = "EasyEffects input or output JSON preset";
|
||||
};
|
||||
types.addCheck baseType (
|
||||
v:
|
||||
baseType.check v
|
||||
&& lib.elem (lib.head (lib.attrNames v)) [
|
||||
"input"
|
||||
"output"
|
||||
]
|
||||
);
|
||||
|
||||
presetOptionType = mkOption {
|
||||
type = types.nullOr (types.attrsOf presetType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue