Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

nixos/bpftune: init

Nick Cao b47c483b 002c2c03

+23
+1
nixos/modules/module-list.nix
··· 1142 ./services/security/vaultwarden/default.nix 1143 ./services/security/yubikey-agent.nix 1144 ./services/system/automatic-timezoned.nix 1145 ./services/system/cachix-agent/default.nix 1146 ./services/system/cachix-watch-store.nix 1147 ./services/system/cloud-init.nix
··· 1142 ./services/security/vaultwarden/default.nix 1143 ./services/security/yubikey-agent.nix 1144 ./services/system/automatic-timezoned.nix 1145 + ./services/system/bpftune.nix 1146 ./services/system/cachix-agent/default.nix 1147 ./services/system/cachix-watch-store.nix 1148 ./services/system/cloud-init.nix
+22
nixos/modules/services/system/bpftune.nix
···
··· 1 + { config, lib, pkgs, ... }: 2 + let 3 + cfg = config.services.bpftune; 4 + in 5 + { 6 + meta = { 7 + maintainers = with lib.maintainers; [ nickcao ]; 8 + }; 9 + 10 + options = { 11 + services.bpftune = { 12 + enable = lib.mkEnableOption (lib.mdDoc "bpftune BPF driven auto-tuning"); 13 + 14 + package = lib.mkPackageOptionMD pkgs "bpftune" { }; 15 + }; 16 + }; 17 + 18 + config = lib.mkIf cfg.enable { 19 + systemd.packages = [ cfg.package ]; 20 + systemd.services.bpftune.wantedBy = [ "multi-user.target" ]; 21 + }; 22 + }