split custom kernel into overlay

also bump to 5.11.20 and add features thing so nix knows it has 32-bit
emulation
also added winesync
This commit is contained in:
LavaDesu 2021-05-13 20:31:05 +07:00
parent 915e86ea3f
commit 1f62998065
Signed by: cilly
GPG key ID: 6500251E087653C9
5 changed files with 55 additions and 41 deletions

View file

@ -21,46 +21,6 @@
"radeon.si_support=0"
"intel_pstate=passive"
];
kernelPackages = pkgs.linuxPackagesFor (pkgs.linuxManualConfig {
inherit (pkgs) lib stdenv;
#stdenv = pkgs.ccacheStdenv;
version = "5.11.19-lqx-Lava";
allowImportFromDerivation = true;
configfile = ./kernel.config;
isZen = true;
src = builtins.fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.tar.xz";
sha256 = "1d37w0zvmf8c1l99xvy1hy6p55icjhmbsv7f0amxy2nly1a7pw04";
};
kernelPatches = [
{
name = "19-lqx1";
patch = builtins.fetchurl {
url = "https://github.com/zen-kernel/zen-kernel/releases/download/v5.11.19-lqx1/v5.11.19-lqx1.patch.xz";
sha256 = "15js72w0fnikdmiwhnh3ks3gdbdsng7zjhriirxbdkj3k1y8r7va";
};
}
{
name = "amd";
patch = builtins.fetchurl {
url = "https://gist.githubusercontent.com/LavaDesu/98997b93ced7337ef3b6b12c4fc4d9dd/raw/7fe92260c2af90a405ff4c3153707a12664d8dd2/0001-Lava-s-amdgpu-patches.patch";
sha256 = "09vf2scckw2blw75ggyjqk432x33vym6qyjhy61w5zpbgmm75lql";
};
}
{
name = "no-extver";
patch = builtins.fetchurl {
url = "https://gist.githubusercontent.com/LavaDesu/98997b93ced7337ef3b6b12c4fc4d9dd/raw/7fe92260c2af90a405ff4c3153707a12664d8dd2/0001-Remove-EXTRAVERSION.patch";
sha256 = "0yc1knzn5nq4dw0n3x0467rv4rdh9pmfz593w1cy5n642ivm8lac";
};
}
];
});
kernelPackages = pkgs.linux-lava;
};
# programs.ccache = {
# enable = true;
# cacheDir = "/var/cache/ccache";
# packageNames = ["dummy"];
# };
}

View file

@ -17,6 +17,7 @@
'';
};
nixpkgs.overlays = with overlays; [
linux
polybar
picom
];

View file

@ -12,6 +12,7 @@
nix.registry.nixpkgs.flake = nixpkgs;
};
overlays = {
linux = import ./overlays/linux.nix;
picom = import ./overlays/picom.nix;
polybar = import ./overlays/polybar.nix;
};

View file

@ -19,6 +19,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#
CONFIG_WINESYNC=m
CONFIG_SCHED_MUQSS=y
CONFIG_ZEN_INTERACTIVE=y
CONFIG_INIT_ENV_ARG_LIMIT=32

51
overlays/linux.nix Normal file
View file

@ -0,0 +1,51 @@
self: super: {
linux-lava = super.linuxPackagesFor ((super.linuxManualConfig {
inherit (super) lib stdenv;
version = "5.11.20-lqx-Lava";
allowImportFromDerivation = true;
configfile = ./kernel.config;
isZen = true;
src = builtins.fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.tar.xz";
sha256 = "1d37w0zvmf8c1l99xvy1hy6p55icjhmbsv7f0amxy2nly1a7pw04";
};
kernelPatches = [
{
name = "20-lqx1";
patch = builtins.fetchurl {
url = "https://github.com/zen-kernel/zen-kernel/releases/download/v5.11.20-lqx1/v5.11.20-lqx1.patch.xz";
sha256 = "0ff6w8xr3v85gqmdg0qk04hf34rnz4dkvd8xxyvkw78dkjfm4aqm";
};
}
{
name = "amd";
patch = builtins.fetchurl {
url = "https://gist.githubusercontent.com/LavaDesu/98997b93ced7337ef3b6b12c4fc4d9dd/raw/7fe92260c2af90a405ff4c3153707a12664d8dd2/0001-Lava-s-amdgpu-patches.patch";
sha256 = "09vf2scckw2blw75ggyjqk432x33vym6qyjhy61w5zpbgmm75lql";
};
}
{
name = "no-extver";
patch = builtins.fetchurl {
url = "https://gist.githubusercontent.com/LavaDesu/98997b93ced7337ef3b6b12c4fc4d9dd/raw/89778e6256bc224abca16943c18f2f961286b941/0001-Remove-EXTRAVERSION.patch";
sha256 = "03rrl1dns9r0nq0qmlmxazi4rxgrbflxzzgr1hmlp75ypcy9izyv";
};
}
{
name = "winesync";
patch = builtins.fetchurl {
url = "https://raw.githubusercontent.com/Frogging-Family/linux-tkg/master/linux-tkg-patches/5.11/0007-v5.11-winesync.patch";
sha256 = "0lf374ccxhhr8idb8kbpzxzw7pi4s4ghdvnffp4pd6q56qs5j86j";
};
}
];
}).overrideAttrs(o: {
passthru = o.passthru // {
features = {
efiBootStub = true;
ia32Emulation = true;
};
};
}));
}