improve voxtype post-processing config handling
This commit is contained in:
@@ -32,6 +32,10 @@ let
|
|||||||
'';
|
'';
|
||||||
meta.mainProgram = "voxtype-post-process";
|
meta.mainProgram = "voxtype-post-process";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postProcessingConfig = pkgs.writeText "voxtype-post-processing.json" (
|
||||||
|
builtins.toJSON cfg.postProcessing.settings
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.voxtype = {
|
options.programs.voxtype = {
|
||||||
@@ -83,10 +87,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.postProcessing.enable {
|
config = lib.mkIf cfg.postProcessing.enable {
|
||||||
xdg.configFile."voxtype/post-processing.json".text = builtins.toJSON cfg.postProcessing.settings;
|
xdg.configFile."voxtype/post-processing.json".source = postProcessingConfig;
|
||||||
programs.voxtype.settings.output.post_process = {
|
programs.voxtype.settings.output.post_process = {
|
||||||
command = lib.getExe postProcess;
|
command = lib.getExe postProcess;
|
||||||
timeout_ms = 5 * 60 * 1000; # 5 minutes
|
timeout_ms = 5 * 60 * 1000; # 5 minutes
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user.services.voxtype.Service.X-Reload-If-Changed = [
|
||||||
|
postProcess
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user