-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add module for defining easyeffects presets
- Loading branch information
Showing
6 changed files
with
378 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
imports = [ | ||
./preset.nix | ||
]; | ||
|
||
services.easyeffects = { | ||
enable = true; | ||
|
||
presets = [ | ||
{ | ||
# Antlion Modmic Wireless | ||
device = "alsa_input.usb-Antlion_Audio_Antlion_Wireless_Microphone-00.mono-fallback"; | ||
file = ./presets/Modmic.json; | ||
type = "input"; | ||
profile = "analog-input-mic"; | ||
} | ||
{ | ||
# Sennheiser HD6XX - Harman target | ||
device = "alsa_output.usb-Topping_D10-00.HiFi__hw_D10_0__sink"; | ||
file = ./presets/HD6XX.json; | ||
type = "output"; | ||
profile = "[Out] Headphones"; | ||
} | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
lib, | ||
config, | ||
... | ||
}: | ||
with lib; let | ||
cfg = config.services.easyeffects; | ||
in { | ||
options = { | ||
services.easyeffects.presets = mkOption { | ||
type = types.listOf (types.submodule { | ||
options = { | ||
device = mkOption { | ||
type = types.str; | ||
}; | ||
type = mkOption { | ||
type = types.enum ["input" "output"]; | ||
}; | ||
profile = mkOption { | ||
type = types.str; | ||
}; | ||
file = mkOption { | ||
type = types.path; | ||
}; | ||
description = mkOption { | ||
type = types.str; | ||
default = "Created by Home Manager"; | ||
}; | ||
}; | ||
}); | ||
}; | ||
}; | ||
config = { | ||
xdg.configFile = lib.mergeAttrsList ( | ||
map ({ | ||
device, | ||
type, | ||
profile, | ||
file, | ||
description, | ||
}: let | ||
name = builtins.head (lib.splitString "." (builtins.baseNameOf file)); | ||
in { | ||
"easyeffects/${type}/${name}.json".source = file; | ||
"easyeffects/autoload/${type}/${device}.json".text = | ||
builtins.toJSON | ||
{ | ||
device = device; | ||
device-description = description; | ||
device-profile = profile; | ||
preset-name = name; | ||
}; | ||
}) | ||
cfg.presets | ||
); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
{ | ||
"output": { | ||
"blocklist": [], | ||
"equalizer#0": { | ||
"balance": 0.0, | ||
"bypass": false, | ||
"input-gain": -7.9, | ||
"left": { | ||
"band0": { | ||
"frequency": 31.5, | ||
"gain": 7.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band1": { | ||
"frequency": 63.0, | ||
"gain": 3.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band2": { | ||
"frequency": 125.0, | ||
"gain": -0.8, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band3": { | ||
"frequency": 250.0, | ||
"gain": -1.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band4": { | ||
"frequency": 500.0, | ||
"gain": 0.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band5": { | ||
"frequency": 1000.0, | ||
"gain": -0.4, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band6": { | ||
"frequency": 2000.0, | ||
"gain": 1.6, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band7": { | ||
"frequency": 4000.0, | ||
"gain": 2.6, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band8": { | ||
"frequency": 8000.0, | ||
"gain": 2.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band9": { | ||
"frequency": 16000.0, | ||
"gain": 0.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
} | ||
}, | ||
"mode": "IIR", | ||
"num-bands": 10, | ||
"output-gain": 0.0, | ||
"pitch-left": 0.0, | ||
"pitch-right": 0.0, | ||
"right": { | ||
"band0": { | ||
"frequency": 31.5, | ||
"gain": 7.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band1": { | ||
"frequency": 63.0, | ||
"gain": 3.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band2": { | ||
"frequency": 125.0, | ||
"gain": -0.8, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band3": { | ||
"frequency": 250.0, | ||
"gain": -1.9, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band4": { | ||
"frequency": 500.0, | ||
"gain": 0.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band5": { | ||
"frequency": 1000.0, | ||
"gain": -0.4, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band6": { | ||
"frequency": 2000.0, | ||
"gain": 1.6, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band7": { | ||
"frequency": 4000.0, | ||
"gain": 2.6, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band8": { | ||
"frequency": 8000.0, | ||
"gain": 2.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
}, | ||
"band9": { | ||
"frequency": 16000.0, | ||
"gain": 0.0, | ||
"mode": "APO (DR)", | ||
"mute": false, | ||
"q": 1.41, | ||
"slope": "x1", | ||
"solo": false, | ||
"type": "Bell", | ||
"width": 4.0 | ||
} | ||
}, | ||
"split-channels": false | ||
}, | ||
"plugins_order": [ | ||
"equalizer#0" | ||
] | ||
} | ||
} |
Oops, something went wrong.