1{ config, pkgs, lib, ... }:
2
3with lib;
4
5let cfg = config.programs.noisetorch;
6in {
7 options.programs.noisetorch = {
8 enable = mkEnableOption "noisetorch + setcap wrapper";
9
10 package = mkOption {
11 type = types.package;
12 default = pkgs.noisetorch;
13 description = ''
14 The noisetorch package to use.
15 '';
16 };
17 };
18
19 config = mkIf cfg.enable {
20 security.wrappers.noisetorch = {
21 source = "${cfg.package}/bin/noisetorch";
22 capabilities = "cap_sys_resource=+ep";
23 };
24 };
25}