about summary refs log tree commit diff
path: root/nixos/modules/services/system/bpftune.nix
blob: 7106d5e4f78e3e366cb71976b40c398af4e5a63a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, lib, pkgs, ... }:
let
  cfg = config.services.bpftune;
in
{
  meta = {
    maintainers = with lib.maintainers; [ nickcao ];
  };

  options = {
    services.bpftune = {
      enable = lib.mkEnableOption (lib.mdDoc "bpftune BPF driven auto-tuning");

      package = lib.mkPackageOption pkgs "bpftune" { };
    };
  };

  config = lib.mkIf cfg.enable {
    systemd.packages = [ cfg.package ];
    systemd.services.bpftune.wantedBy = [ "multi-user.target" ];
  };
}