diff options
author | Griffin Smith <root@gws.fyi> | 2020-05-04T17·12-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2020-05-04T17·12-0400 |
commit | 46cd32c557128cea69ff9a2d7c9efe425d0063a0 (patch) | |
tree | e852a5206602550384790e873057152c72986d00 /system | |
parent | 9405a6391a2cc76fdb0977da2bcf27a400f73c7e (diff) |
linux-ck
Diffstat (limited to 'system')
-rw-r--r-- | system/modules/common.nix | 1 | ||||
-rw-r--r-- | system/modules/kernel.nix | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/system/modules/common.nix b/system/modules/common.nix index feb8b92b09a6..8d2902eaa6ae 100644 --- a/system/modules/common.nix +++ b/system/modules/common.nix @@ -7,6 +7,7 @@ ./emacs.nix ./sound.nix ./urbint.nix + ./kernel.nix ]; boot.loader.systemd-boot.enable = true; diff --git a/system/modules/kernel.nix b/system/modules/kernel.nix new file mode 100644 index 000000000000..92aa6955a73b --- /dev/null +++ b/system/modules/kernel.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: +with lib.versions; +let + inherit (pkgs) runCommand; + kernelRelease = config.linuxPackages.kernel.version or pkgs.linux.version; + mj = major kernelRelease; + mm = majorMinor kernelRelease; + linux-ck = runCommand "linux-ck-combined.patch" {} '' + ${pkgs.xz}/bin/unxz -kfdc ${builtins.fetchurl { + # http://ck.kolivas.org/patches/5.0/5.4/5.4-ck1/patch-5.4-ck1.xz + url = "http://ck.kolivas.org/patches/${mj}.0/${mm}/${mm}-ck1/patch-${mm}-ck1.xz"; + sha256 = "0p2ccwlsmq0587x6cnbrk4h2bwpl9342bmhsbyi1a87cs2jfwigl"; + }} > $out + ''; +in +{ + boot.kernelPackages = pkgs.linuxPackages.extend (self: super: { + kernel = super.kernel.override { + kernelPatches = super.kernel.kernelPatches ++ [{ + name = "linux-ck"; + patch = linux-ck; + }]; + argsOverride = { + modDirVersion = super.kernel.modDirVersion + "-ck1"; + }; + }; + }); +} |