linuxPackages: introduce hardenedLinuxPackagesFor
and cleanup some expressions using it
This commit is contained in:
parent
2341c81427
commit
3a2ee6e5c3
@ -12876,16 +12876,12 @@ with pkgs;
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
linux_hardened_copperhead = callPackage ../os-specific/linux/kernel/linux-hardened-copperhead.nix {
|
linux_copperhead = callPackage ../os-specific/linux/kernel/linux-copperhead-hardened.nix {
|
||||||
kernelPatches = with kernelPatches; [
|
kernelPatches = with kernelPatches; [
|
||||||
kernelPatches.bridge_stp_helper
|
kernelPatches.bridge_stp_helper
|
||||||
kernelPatches.modinst_arg_list_too_long
|
kernelPatches.modinst_arg_list_too_long
|
||||||
kernelPatches.tag_hardened
|
kernelPatches.tag_hardened
|
||||||
];
|
];
|
||||||
extraConfig = import ../os-specific/linux/kernel/hardened-config.nix {
|
|
||||||
inherit stdenv;
|
|
||||||
inherit (linux_hardened_copperhead) version;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# linux mptcp is based on the 4.4 kernel
|
# linux mptcp is based on the 4.4 kernel
|
||||||
@ -13019,8 +13015,6 @@ with pkgs;
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
linux_samus_latest = linux_samus_4_12;
|
|
||||||
|
|
||||||
/* Linux kernel modules are inherently tied to a specific kernel. So
|
/* Linux kernel modules are inherently tied to a specific kernel. So
|
||||||
rather than provide specific instances of those packages for a
|
rather than provide specific instances of those packages for a
|
||||||
specific kernel, we have a function that builds those packages
|
specific kernel, we have a function that builds those packages
|
||||||
@ -13172,7 +13166,6 @@ with pkgs;
|
|||||||
|
|
||||||
# Build the kernel modules for the some of the kernels.
|
# Build the kernel modules for the some of the kernels.
|
||||||
linuxPackages_beagleboard = linuxPackagesFor pkgs.linux_beagleboard;
|
linuxPackages_beagleboard = linuxPackagesFor pkgs.linux_beagleboard;
|
||||||
linuxPackages_hardened_copperhead = linuxPackagesFor pkgs.linux_hardened_copperhead;
|
|
||||||
linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp;
|
linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp;
|
||||||
linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi;
|
linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi;
|
||||||
linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4);
|
linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4);
|
||||||
@ -13198,19 +13191,24 @@ with pkgs;
|
|||||||
linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
|
linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
|
||||||
|
|
||||||
# Hardened linux
|
# Hardened linux
|
||||||
linux_hardened = let linux = pkgs.linuxPackages_latest.kernel; in linux.override {
|
hardenedLinuxPackagesFor = kernel: linuxPackagesFor (kernel.override {
|
||||||
extraConfig = import ../os-specific/linux/kernel/hardened-config.nix {
|
extraConfig = import ../os-specific/linux/kernel/hardened-config.nix {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
inherit (linux) version;
|
inherit (kernel) version;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
linuxPackages_hardened =
|
linuxPackages_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_latest);
|
||||||
recurseIntoAttrs (linuxPackagesFor linux_hardened);
|
linux_hardened = linuxPackages_hardened.kernel;
|
||||||
|
|
||||||
|
linuxPackages_copperhead_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_copperhead);
|
||||||
|
linux_copperhead_hardened = linuxPackages_copperhead_hardened.kernel;
|
||||||
|
linux_hardened_copperhead = linux_copperhead_hardened; # alias for backward compatibility
|
||||||
|
|
||||||
# Samus kernels
|
# Samus kernels
|
||||||
linuxPackages_samus_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_samus_4_12);
|
linuxPackages_samus_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_samus_4_12);
|
||||||
linuxPackages_samus_latest = recurseIntoAttrs (linuxPackagesFor pkgs.linux_samus_latest);
|
linuxPackages_samus_latest = linuxPackages_samus_4_12;
|
||||||
|
linux_samus_latest = linuxPackages_samus_latest.kernel;
|
||||||
|
|
||||||
# A function to build a manually-configured kernel
|
# A function to build a manually-configured kernel
|
||||||
linuxManualConfig = pkgs.buildLinux;
|
linuxManualConfig = pkgs.buildLinux;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user