[Hardening] use hardened kernel by default, but do not force it

This commit is contained in:
Antoine Viallon 2024-03-08 23:27:09 +01:00
parent 07893642d7
commit 3080d90d2c
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -35,7 +35,7 @@ in
];
config = mkIf cfg.enable {
aviallon.boot.kernel.package = mkIf cfg.hardcore pkgs.linuxKernel.kernels.linux_hardened;
aviallon.boot.kernel.package = mkIf cfg.hardcore (mkDefault pkgs.linuxKernel.kernels.linux_hardened);
security.lockKernelModules = mkIf cfg.hardcore (mkQuasiForce true);
# security.protectKernelImage = mkIf cfg.hardcore (mkOverride 500 false); # needed for kexec