Fix self reference in README (Fix #22)

This commit is contained in:
Lan Tian 2026-01-10 22:32:31 -08:00
parent f620f05781
commit eac41befde
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B

View File

@ -85,6 +85,7 @@ Add the repo's overlay in your NixOS configuration, this will expose the package
```nix
{
outputs = { nix-cachyos-kernel, ... }: {
nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@ -94,11 +95,11 @@ Add the repo's overlay in your NixOS configuration, this will expose the package
nixpkgs.overlays = [
# Build the kernels on top of nixpkgs version in your flake.
# Binary cache may be unavailable for the kernel/nixpkgs version combos.
self.overlays.default
nix-cachyos-kernel.overlays.default
# Alternatively: use the exact kernel versions as defined in this repo.
# Guarantees you have binary cache.
self.overlays.pinned
nix-cachyos-kernel.overlays.pinned
# Only use one of the two overlays!
];
@ -108,12 +109,12 @@ Add the repo's overlay in your NixOS configuration, this will expose the package
)
];
};
};
}
```
Then specify `pkgs.cachyosKernels.linuxPackages-cachyos-latest` (or other variants you'd like) in your `boot.kernelPackages` option.
### Binary cache
I'm running a Hydra CI to build the kernels and push them to my Attic binary cache. You can see the build status here: <https://hydra.lantian.pub/jobset/lantian/nix-cachyos-kernel>
@ -144,13 +145,14 @@ This repo also has [Garnix CI](https://garnix.io) set up, and should work as lon
```nix
{
outputs = { nix-cachyos-kernel, ... }: {
nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ pkgs, ... }:
{
nixpkgs.overlays = [ self.overlays.pinned ];
nixpkgs.overlays = [ nix-cachyos-kernel.overlays.pinned ];
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
# Binary cache
@ -162,13 +164,16 @@ This repo also has [Garnix CI](https://garnix.io) set up, and should work as lon
)
];
};
};
}
```
### Help! My kernel is failing to build!
In most cases, failing to build a kernel is caused by version mismatch between CachyOS patches and nixpkgs kernel version. (e.g. hardened 6.18 kernel as of 2025-12-12)
Common symptoms are:
- "File not found" error, which indicates that CachyOS patches for given kernel version/variant are unavailable.
- Failures/conflicts when applying patches, which indicates that CachyOS patches are for an older kernel version.
@ -182,13 +187,14 @@ To use ZFS module with `linuxPackages-cachyos-*` provided by this flake, point `
```nix
{
outputs = { nix-cachyos-kernel, ... }: {
nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ pkgs, ... }:
{
nixpkgs.overlays = [ self.overlay ];
nixpkgs.overlays = [ nix-cachyos-kernel.overlays.default ];
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
# ZFS config
@ -200,6 +206,7 @@ To use ZFS module with `linuxPackages-cachyos-*` provided by this flake, point `
)
];
};
};
}
```
@ -207,13 +214,14 @@ If you want to construct your own `linuxPackages` attrset with `linuxKernel.pack
```nix
{
outputs = { nix-cachyos-kernel, ... }: {
nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ pkgs, ... }:
{
nixpkgs.overlays = [ self.overlay ];
nixpkgs.overlays = [ nix-cachyos-kernel.overlays.default ];
boot.kernelPackages = pkgs.linuxKernel.packagesFor pkgs.cachyosKernels.linux-cachyos-latest;
# ZFS config
@ -227,6 +235,7 @@ If you want to construct your own `linuxPackages` attrset with `linuxKernel.pack
)
];
};
};
}
```