From 01228bbe176aa7571e929ca5bab3f03227509529 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 14 Feb 2015 18:51:28 +0100 Subject: tishtushi: Really use the latest mainline kernel. I can't emphasize this enough: *REALLY* Whenever the newest stable kernel is released, the version in linux_testing will *still* the latest -rc even though it's older than the current stable. Strictly speaking, it's true that even though the stable version is newer, the label "testing" is correct. However, and in my case I want to really have the latest mainline version, no matter whether it's stable or testing. So, we're just comparing the major and minor version numbers and if they match, we're using the latest stable, otherwise we're using testing. Signed-off-by: aszlig --- machines/tishtushi.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'machines/tishtushi.nix') diff --git a/machines/tishtushi.nix b/machines/tishtushi.nix index d4e2a0c9..3e067ca9 100644 --- a/machines/tishtushi.nix +++ b/machines/tishtushi.nix @@ -11,9 +11,11 @@ in { imports = singleton ../common-workstation.nix; boot = rec { - kernelPackages = let - origKernel = pkgs.linux_testing; - bfqsched = pkgs.vuizvuiKernelPatches.bfqsched // { + kernelPackages = with pkgs; let + trimVer = ver: take 2 (splitString "." (replaceChars ["-"] ["."] ver)); + tooOld = trimVer linux_latest.version == trimVer linux_testing.version; + origKernel = if tooOld then linux_latest else linux_testing; + bfqsched = vuizvuiKernelPatches.bfqsched // { extraConfig = '' IOSCHED_BFQ y CGROUP_BFQIO y @@ -25,7 +27,7 @@ in { kernel = origKernel.override { kernelPatches = origKernel.kernelPatches ++ singleton bfqsched; }; - in pkgs.linuxPackagesFor kernel kernelPackages; + in linuxPackagesFor kernel kernelPackages; initrd.kernelModules = [ "fbcon" "usb_storage" ]; loader.grub.device = "/dev/disk/by-id/${diskID}"; -- cgit 1.4.1