depot/third_party/nixpkgs/nixos/modules/programs/noisetorch.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

23 lines
515 B
Nix

{ config, pkgs, lib, ... }:
with lib;
let cfg = config.programs.noisetorch;
in
{
options.programs.noisetorch = {
enable = mkEnableOption (lib.mdDoc "noisetorch + setcap wrapper");
package = mkPackageOption pkgs "noisetorch" { };
};
config = mkIf cfg.enable {
security.wrappers.noisetorch = {
owner = "root";
group = "root";
capabilities = "cap_sys_resource=+ep";
source = "${cfg.package}/bin/noisetorch";
};
environment.systemPackages = [ cfg.package ];
};
}