mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/ananicy: re enable BPF on hardened kernels
This was a workaround to begin with, as hardened kernel didn't support tracing. Back then kernel level tracing was only available through debugfs, and now that tracefs has been available on NixOS for a while now, enabled in Link: https://github.com/NixOS/nixpkgs/pull/388751 This workaround can be removed and bpf can be used with tracefs. Link: https://github.com/NixOS/nixpkgs/issues/360957 Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
parent
7740682322
commit
51dc163364
1 changed files with 2 additions and 8 deletions
|
|
@ -19,12 +19,6 @@ let
|
|||
);
|
||||
servicename =
|
||||
if ((lib.getName cfg.package) == (lib.getName pkgs.ananicy-cpp)) then "ananicy-cpp" else "ananicy";
|
||||
# Ananicy-CPP with BPF is not supported on hardened kernels https://github.com/NixOS/nixpkgs/issues/327382
|
||||
finalPackage =
|
||||
if (servicename == "ananicy-cpp" && config.boot.kernelPackages.isHardened) then
|
||||
(cfg.package.override { withBpf = false; })
|
||||
else
|
||||
cfg.package;
|
||||
in
|
||||
{
|
||||
options.services.ananicy = {
|
||||
|
|
@ -113,7 +107,7 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ finalPackage ];
|
||||
systemPackages = [ cfg.package ];
|
||||
etc."ananicy.d".source =
|
||||
pkgs.runCommand "ananicyfiles"
|
||||
{
|
||||
|
|
@ -170,7 +164,7 @@ in
|
|||
);
|
||||
|
||||
systemd = {
|
||||
packages = [ finalPackage ];
|
||||
packages = [ cfg.package ];
|
||||
services."${servicename}" = {
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue