mirror of
https://github.com/xddxdd/nix-cachyos-kernel.git
synced 2026-07-03 11:08:07 +02:00
Add version mismatch/build failure warnings to default overlay
This commit is contained in:
parent
df9b9eb25f
commit
286f9777b3
13
README.md
13
README.md
@ -48,7 +48,7 @@ This repo provides the following kernel variants, consistent with the [upstream
|
|||||||
|
|
||||||
The kernel versions are automatically kept in sync with Nixpkgs, so once the latest/LTS kernel is updated in Nixpkgs, CachyOS kernels in this repo will automatically catch up.
|
The kernel versions are automatically kept in sync with Nixpkgs, so once the latest/LTS kernel is updated in Nixpkgs, CachyOS kernels in this repo will automatically catch up.
|
||||||
|
|
||||||
Use `nix flake show github:xddxdd/nix-cachyos-kernel` to see the current effective versions.
|
Use `nix flake show github:xddxdd/nix-cachyos-kernel/release` to see the current effective versions.
|
||||||
|
|
||||||
The kernels ending in `-lto` has Clang+ThinLTO enabled.
|
The kernels ending in `-lto` has Clang+ThinLTO enabled.
|
||||||
|
|
||||||
@ -65,6 +65,7 @@ Add the `release` branch this repo to the inputs section of your `flake.nix`:
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
|
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
|
||||||
|
# Do not override its nixpkgs input, otherwise there can be mismatch between patches and kernel version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -93,14 +94,14 @@ Add the repo's overlay in your NixOS configuration, this will expose the package
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
# Build the kernels on top of nixpkgs version in your flake.
|
# Use the exact kernel versions as defined in this repo.
|
||||||
# Binary cache may be unavailable for the kernel/nixpkgs version combos.
|
|
||||||
nix-cachyos-kernel.overlays.default
|
|
||||||
|
|
||||||
# Alternatively: use the exact kernel versions as defined in this repo.
|
|
||||||
# Guarantees you have binary cache.
|
# Guarantees you have binary cache.
|
||||||
nix-cachyos-kernel.overlays.pinned
|
nix-cachyos-kernel.overlays.pinned
|
||||||
|
|
||||||
|
# Alternatively, build the kernels on top of nixpkgs version in your flake.
|
||||||
|
# This might cause version mismatch/build failures!
|
||||||
|
nix-cachyos-kernel.overlays.default
|
||||||
|
|
||||||
# Only use one of the two overlays!
|
# Only use one of the two overlays!
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
13
flake.nix
13
flake.nix
@ -78,10 +78,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
flake = {
|
flake = {
|
||||||
overlay = self.overlays.default;
|
overlay = self.overlays.pinned;
|
||||||
overlays.default = final: prev: {
|
overlays.default =
|
||||||
cachyosKernels = loadPackages prev;
|
builtins.warn
|
||||||
};
|
"\"nix-cachyos-kernel.overlays.default\" may cause kernel/patch version mismatch and build failure. Please use \"nix-cachyos-kernel.overlays.pinned\" instead."
|
||||||
|
(
|
||||||
|
final: prev: {
|
||||||
|
cachyosKernels = loadPackages prev;
|
||||||
|
}
|
||||||
|
);
|
||||||
overlays.pinned = final: prev: {
|
overlays.pinned = final: prev: {
|
||||||
cachyosKernels = self.legacyPackages."${final.stdenv.hostPlatform.system}";
|
cachyosKernels = self.legacyPackages."${final.stdenv.hostPlatform.system}";
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user