From 4a952db006546ad08578d45897aff0d9be9ba0a3 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Sat, 4 Apr 2026 20:32:58 +0100 Subject: [PATCH] Add CachyOS kernel (BORE scheduler) for FredOS-Gaming --- flake.lock | 145 ++++++++++++++++++++++++++++--- flake.nix | 4 +- hosts/hardware/FredOS-Gaming.nix | 10 ++- 3 files changed, 145 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 46cf1b3..e836b3e 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,72 @@ "url": "https://git.bwaaa.monster/beaker" } }, + "cachyos-kernel": { + "flake": false, + "locked": { + "lastModified": 1775145950, + "narHash": "sha256-AfVja9nvYHm0BHbuTvn+K8rKfLmPl5QjoiNecp9HOJU=", + "owner": "CachyOS", + "repo": "linux-cachyos", + "rev": "b91624f68ceaf5394ef1571f60290dca6ba22b45", + "type": "github" + }, + "original": { + "owner": "CachyOS", + "repo": "linux-cachyos", + "type": "github" + } + }, + "cachyos-kernel-patches": { + "flake": false, + "locked": { + "lastModified": 1775157685, + "narHash": "sha256-g8HgH7gADoEnrBN30BK3pz7+M2pT/p3xtfRFEuEov5w=", + "owner": "CachyOS", + "repo": "kernel-patches", + "rev": "c1ba300617a12d257b5721572b9bbe28efae182f", + "type": "github" + }, + "original": { + "owner": "CachyOS", + "repo": "kernel-patches", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1775087534, + "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -25,11 +91,11 @@ ] }, "locked": { - "lastModified": 1775320414, - "narHash": "sha256-pIDPHus8udcxO4lT+zUULBfvue2D08E73abzVEJNE+8=", + "lastModified": 1774991950, + "narHash": "sha256-kScKj3qJDIWuN9/6PMmgy5esrTUkYinrO5VvILik/zw=", "owner": "nix-community", "repo": "home-manager", - "rev": "5ee3b3ef63e469c84639c2c9e282726352c86069", + "rev": "f2d3e04e278422c7379e067e323734f3e8c585a7", "type": "github" }, "original": { @@ -38,6 +104,29 @@ "type": "github" } }, + "nix-cachyos-kernel": { + "inputs": { + "cachyos-kernel": "cachyos-kernel", + "cachyos-kernel-patches": "cachyos-kernel-patches", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1775239578, + "narHash": "sha256-MKJmDHlaxwBcnfCUEA89AwKOOONjOjbjHNNWdSdg5RA=", + "owner": "xddxdd", + "repo": "nix-cachyos-kernel", + "rev": "beaf7a533ae106c2681de2624da94707f9857f1f", + "type": "github" + }, + "original": { + "owner": "xddxdd", + "ref": "release", + "repo": "nix-cachyos-kernel", + "type": "github" + } + }, "nix-flatpak": { "locked": { "lastModified": 1768656715, @@ -55,11 +144,42 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775036866, - "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", + "lastModified": 1775231746, + "narHash": "sha256-EFaDQ0rnuSjKfC/DUKHS4toV4rEBuWhSgyX2Yy0kp00=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", + "rev": "0eac666efaa8a9afea2821f9efc7921b4ef39b4e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1774748309, + "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "333c4e0545a6da976206c74db8773a1645b5870a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", "type": "github" }, "original": { @@ -77,8 +197,8 @@ ] }, "locked": { - "lastModified": 1775330941, - "narHash": "sha256-qBmmeLAa3vXZ0FwgGcXpYQhnmcCyLFBjOc8BYjJaTtE=", + "lastModified": 1774755469, + "narHash": "sha256-sO6h2JLu7eaxILkHQgdAo7oDc8soqJbIShzlzH79tUw=", "type": "tarball", "url": "https://git.bwaaa.monster/omnisearch/snapshot/omnisearch-master.tar.gz" }, @@ -90,8 +210,9 @@ "root": { "inputs": { "home-manager": "home-manager", + "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "omnisearch": "omnisearch", "zen-browser": "zen-browser" } @@ -106,11 +227,11 @@ ] }, "locked": { - "lastModified": 1775278263, - "narHash": "sha256-BgkUmlOuFaaZQCnlhXkQ3/Fng65aq00tJQkpoeTn7Mw=", + "lastModified": 1775021133, + "narHash": "sha256-JB0u0evfSlmNg9HdGDxtXjaCcdKUpFPdSAMGxvJo5Pw=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "bb051d7a0f04356d42528bbb65dc014adf2dab66", + "rev": "4bf1a6837064486c4f573a9d500c4cf3c1c075c0", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ff9705f..e426085 100644 --- a/flake.nix +++ b/flake.nix @@ -23,9 +23,11 @@ }; nix-flatpak.url = "github:gmodena/nix-flatpak"; + + nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; }; - outputs = { self, nixpkgs, home-manager, omnisearch, zen-browser, nix-flatpak, ... } @ inputs: + outputs = { self, nixpkgs, home-manager, omnisearch, zen-browser, nix-flatpak, nix-cachyos-kernel, ... } @ inputs: let system = "x86_64-linux"; mkHost = hostname: nixpkgs.lib.nixosSystem { diff --git a/hosts/hardware/FredOS-Gaming.nix b/hosts/hardware/FredOS-Gaming.nix index 22f4446..64d5306 100644 --- a/hosts/hardware/FredOS-Gaming.nix +++ b/hosts/hardware/FredOS-Gaming.nix @@ -1,10 +1,18 @@ #./hosts/hardware/FredOS-Gaming.nix -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, pkgs, modulesPath, inputs, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.default ]; + boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-bore; + + nix.settings = { + substituters = [ "https://attic.xuyh0120.win/lantian" ]; + trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ]; + }; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" "ntsync" ];