Skip to content

Commit

Permalink
linux_cachyos: fix hardened
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroHLC committed Nov 9, 2023
1 parent 7f58aa0 commit d6451e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ in
linuxPackages_cachyos = cachyosPackages.cachyos;
linuxPackages_cachyos-server = cachyosPackages.cachyos-server;
linuxPackages_cachyos-hardened = cachyosPackages.cachyos-hardened;
linuxPackages-hardened_cachyos = lib.trivial.warn
"`linuxPackages-hardened_cachyos` was renamed to `linuxPackages_cachyos-hardened`"
(final.linuxPackages_cachyos-hardened // {recurseForDerivations = false;});

luxtorpeda = final.callPackage ../pkgs/luxtorpeda {
luxtorpedaVersion = importJSON ../pkgs/luxtorpeda/version.json;
Expand Down
1 change: 1 addition & 0 deletions pkgs/linux-cachyos/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ in
cachyos-hardened = mkCachyKernel {
taste = "archive/linux-cachyos-hardened";
configPath = ./config-nix/cachyos-hardened.x86_64-linux.nix;
cpuSched = "hardened";
};
}
2 changes: 1 addition & 1 deletion pkgs/linux-cachyos/configfile-raw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let
cpuSchedConfig =
if cachyConfig.cpuSched == "eevdf" then
[ ]
else if cachyConfig.cpuSched == "cachyos" then
else if cachyConfig.cpuSched == "cachyos" || cachyConfig.cpuSched == "hardened" then
[ "-e SCHED_BORE" ]
else throw "Unsupported cachyos scheduler";

Expand Down
3 changes: 2 additions & 1 deletion pkgs/linux-cachyos/kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let
};

schedPatch =
if cachyConfig.cpuSched == "cachyos" then
if cachyConfig.cpuSched == "cachyos" || cachyConfig.cpuSched == "hardened" then
"bore-cachy"
else throw "Unsupported cachyos _cpu_sched";
in
Expand All @@ -50,6 +50,7 @@ in
})
([ "${patches-src}/${major}/all/0001-cachyos-base-all.patch" ]
++ lib.optional (cachyConfig.cpuSched != "eevdf") "${patches-src}/${major}/sched/0001-${schedPatch}.patch"
++ lib.optional (cachyConfig.cpuSched != "hardened") "${patches-src}/${major}/misc/0001-hardened.patch"
++ [ "${patches-src}/${major}/misc/0001-Add-extra-version-CachyOS.patch" ]
++ lib.optional cachyConfig.withBCacheFS "${patches-src}/${major}/misc/0001-bcachefs.patch"
);
Expand Down
1 change: 1 addition & 0 deletions pkgs/linux-cachyos/make.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, fetchFromGitHub
, linuxPackagesFor
, nyxUtils
# those are set in their PKGBUILDs
, kernelPatches ? { }
, basicCachy ? true
, cpuSched ? "cachyos"
Expand Down

0 comments on commit d6451e6

Please sign in to comment.