-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/ananicy: disable ananicy-cpp's BPF on hardened kernels, cleanup #331722
Conversation
CC @Artturin |
# 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 { withBpf = false; }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling package works? I've tried in repl and it doesn't. I assume this should be cfg.package.override { withBpf = false; }
.
The problem is that this makes it's impossible to override withBpf
to true
. There is a way to make bpf version work on hardened (explained in the linked issue), and I intend to apply this on my system and use bpf version of ananicy-cpp.
I couldn't find if there's a way to check whether the argument was overriden? We could add this functionality to makeOverridable
.
Though a better idea is probably to add withBpf
as a service option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnRTitor Yeah, this doesn't work. Just upgraded to 24.11 and got
error: attempt to call something which is not a function but a set: { type = "derivation"; NIX_HARDENING_ENABLE = «thunk»; __ignoreNulls = true; __structuredAttrs = «thunk»; all = «thunk»; args = «thunk»; buildInputs = «thunk»; builder = «thunk»; cmakeFlags = «thunk»; configureFlags = «thunk»; «37 attributes elided» }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, I hate GitHub, you never saw that comment, because it was pending. I always forget about this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRs welcomed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though a better idea is probably to add
withBpf
as a service option.
No, because it just duplicates the package override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though a better idea is probably to add
withBpf
as a service option.No, because it just duplicates the package override.
I've made an issue, so we won't misuse this already merged PR. #360957
Description of changes
Ananicy-Cpp does not work with hardened kernels, because bpf support is fully supported on hardened. So let's disable it.
Fixes #327382
Follow up to #330488
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.