1 { config, pkgs, lib, ... }:
3 let cfg = config.programs.noisetorch;
6 options.programs.noisetorch = {
7 enable = lib.mkEnableOption "noisetorch (+ setcap wrapper), a virtual microphone device with noise suppression";
9 package = lib.mkPackageOption pkgs "noisetorch" { };
12 config = lib.mkIf cfg.enable {
13 security.wrappers.noisetorch = {
16 capabilities = "cap_sys_resource=+ep";
17 source = "${cfg.package}/bin/noisetorch";
19 environment.systemPackages = [ cfg.package ];