Setup flake-compat

This commit is contained in:
Lan Tian 2025-12-08 21:50:34 -08:00
parent f44b211abc
commit dbdb00123f
No known key found for this signature in database
GPG Key ID: 04E66B6B25A0862B
4 changed files with 35 additions and 0 deletions

View File

@ -24,6 +24,8 @@ This repo provides the latest kernel version and the latest LTS kernel version:
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.
The kernels ending in `-lto` has Clang+ThinLTO enabled.
For each linux kernel entry under `packages`, we have a corresponding `linuxPackages` entry under `legacyPackages` for easier use in your NixOS configuration, e.g.:

12
default.nix Normal file
View File

@ -0,0 +1,12 @@
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
) { src = ./.; }).defaultNix

View File

@ -32,6 +32,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1765121682,
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@ -85,6 +101,7 @@
"inputs": {
"cachyos-kernel": "cachyos-kernel",
"cachyos-kernel-patches": "cachyos-kernel-patches",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}

View File

@ -3,6 +3,10 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-compat = {
url = "github:NixOS/flake-compat";
flake = false;
};
cachyos-kernel = {
url = "github:CachyOS/linux-cachyos";