I employed hardened.nix as much as possible, leaving out options that noticeably degrade performance (as far as i understand it).
Enabling security.lockKernelModules = mkDefault true;
leads to my system not being able to access the internet which i find strange, as this is enabled by default in the hardened.nix
profile.
Anyway, my main question is regarding the following options (i’m fairly new to Nixos and still don’t really understand its inner workings):
# Restrict ptrace() usage to processes with a pre-defined relationship
# (e.g., parent/child)
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkOverride 500 1;
# Hide kptrs even for processes with CAP_SYSLOG
boot.kernel.sysctl."kernel.kptr_restrict" = mkOverride 500 2;
Why does it say mkOverride
? Why does it have the number 500
in it?
The trailing number (1 and 2) is what i want to set and i don’t know what mkOverride 500
does and why it is 500
by default.
Thank you for your explanation!