[Boot+Treewide] rename aviallon.boot.kernel to aviallon.boot.kernel.package

Rename aviallon.boot.extraKCflags to aviallon.boot.kernel.addOptimizationAttributes

Also add an option to add non-optimization attributes to kernel derivation.
This commit is contained in:
Antoine Viallon 2023-11-07 21:27:57 +01:00
parent 418f672a18
commit ec9cfceda6
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
3 changed files with 48 additions and 29 deletions

View file

@ -41,7 +41,7 @@ in
# imports = [
# (modulesPath + "/profiles/hardened.nix")
# ];
aviallon.boot.kernel = mkIf cfg.hardcore pkgs.linuxKernel.kernels.linux_hardened;
aviallon.boot.kernel.package = 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