mirror of
https://github.com/hyprwm/hyprland-infra.git
synced 2025-05-12 21:30:36 +01:00
modules/security: hardened kernel; protect kernel & modules
This commit is contained in:
parent
3d9b446c98
commit
ca724b08b3
1 changed files with 19 additions and 0 deletions
19
modules/security.nix
Normal file
19
modules/security.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
boot.kernelPackages = pkgs.linuxPackages_hardened;
|
||||
security = {
|
||||
# Do not allow loading additional kernel modules imperatively.
|
||||
lockKernelModules = false;
|
||||
|
||||
# Disallow replacing the running kernel. This breaks hibernation
|
||||
# which is practically useless on a server.
|
||||
protectKernelImage = true;
|
||||
|
||||
allowSimultaneousMultithreading = mkForce false;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue