[Boot] Add kernel config option to aviallon namespace

Allows advanced patching / overriding of the kernel while still allowing
to set the kernel in other modules.
This commit is contained in:
Antoine Viallon 2022-11-09 17:26:18 +01:00
parent 3f22bcff49
commit 91c5ba1e69
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
3 changed files with 13 additions and 5 deletions

View file

@ -41,7 +41,7 @@ in
# imports = [
# (modulesPath + "/profiles/hardened.nix")
# ];
boot.kernelPackages = mkIf cfg.hardcore pkgs.linuxPackages_hardened;
aviallon.boot.kernel = mkIf cfg.hardcore pkgs.linuxKernel.kernels.linux_hardened;
security.lockKernelModules = mkIf cfg.hardcore (mkOverride 500 true);
# security.protectKernelImage = mkIf cfg.hardcore (mkOverride 500 false); # needed for kexec