From 8df547dd8b054ecd53a3abbc6ddc42cd3cc9ef59 Mon Sep 17 00:00:00 2001 From: tux Date: Sun, 20 Sep 2026 04:00:22 +0530 Subject: [PATCH] feat(core): add cachyos kernel and configure hosts --- flake.lock | 195 ++++++++++++++++++++-------- flake.nix | 1 + modules/flake/overlays.nix | 1 + modules/hosts/alpha/hardware.nix | 2 + modules/hosts/arcturus/hardware.nix | 1 + modules/hosts/canopus/hardware.nix | 1 + modules/hosts/sirius/hardware.nix | 1 + modules/hosts/vps/hardware.nix | 2 + modules/nixos/boot/misc.nix | 3 +- modules/nixos/core/substituters.nix | 2 + 10 files changed, 153 insertions(+), 56 deletions(-) diff --git a/flake.lock b/flake.lock index 2cbd88f..1a70620 100644 --- a/flake.lock +++ b/flake.lock @@ -319,6 +319,22 @@ "type": "github" } }, + "flake-compat_7": { + "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": [ @@ -400,6 +416,24 @@ } }, "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1788450739, + "narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_6": { "inputs": { "nixpkgs-lib": [ "nur", @@ -420,9 +454,9 @@ "type": "github" } }, - "flake-parts_6": { + "flake-parts_7": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { "lastModified": 1788450739, @@ -438,9 +472,9 @@ "type": "github" } }, - "flake-parts_7": { + "flake-parts_8": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" + "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { "lastModified": 1788450739, @@ -1167,6 +1201,27 @@ "type": "github" } }, + "nix-cachyos-kernel": { + "inputs": { + "flake-compat": "flake-compat_6", + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_12" + }, + "locked": { + "lastModified": 1789241994, + "narHash": "sha256-kY+k8kGBd8w4kxrw8IPzQGpnYZQV4mik2ZNHtGN0eHI=", + "owner": "xddxdd", + "repo": "nix-cachyos-kernel", + "rev": "444d135dde71c1de547cf7bfd73e67145e67aebb", + "type": "github" + }, + "original": { + "owner": "xddxdd", + "ref": "release", + "repo": "nix-cachyos-kernel", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -1267,7 +1322,7 @@ "inputs": { "home-manager": "home-manager_4", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_13", "nixpkgs-nixcord": "nixpkgs-nixcord", "treefmt-nix": "treefmt-nix_2" }, @@ -1287,7 +1342,7 @@ }, "nixos-hardware": { "inputs": { - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1789752250, @@ -1397,6 +1452,21 @@ "type": "github" } }, + "nixpkgs-lib_4": { + "locked": { + "lastModified": 1788057806, + "narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-nixcord": { "locked": { "lastModified": 1789459628, @@ -1462,6 +1532,22 @@ } }, "nixpkgs_12": { + "locked": { + "lastModified": 1789181251, + "narHash": "sha256-8yaO1XLoObzYgb6Uj+0IkUxbkCI6kBLuImoZAuAHzB4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f496248152e1ad8c61b59a6739cc499b447168e4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { "locked": { "lastModified": 1789459628, "narHash": "sha256-JOaadoI/IC9qEvwlnjwAhwdcWkCDqEeOJ+cOtUH/8RQ=", @@ -1477,7 +1563,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1789546076, "narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=", @@ -1490,39 +1576,39 @@ "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, - "nixpkgs_14": { - "locked": { - "lastModified": 1789684949, - "narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e554fab72f81915600f3f449b786fd9af40439a5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_15": { "locked": { "lastModified": 1789684949, "narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=", - "owner": "nixos", + "owner": "NixOS", "repo": "nixpkgs", "rev": "e554fab72f81915600f3f449b786fd9af40439a5", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_16": { + "locked": { + "lastModified": 1789684949, + "narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e554fab72f81915600f3f449b786fd9af40439a5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_17": { "locked": { "lastModified": 1776683584, "narHash": "sha256-NuTLMrr10Tng72hurYG8jYQ4XKK8wnpJmOGcPiis96g=", @@ -1538,7 +1624,7 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_18": { "locked": { "lastModified": 1789426278, "narHash": "sha256-GnotcvKtbTMnoVx6G4E7ZdUX6487Dky74dqq3pU7iRk=", @@ -1554,7 +1640,7 @@ "type": "github" } }, - "nixpkgs_18": { + "nixpkgs_19": { "locked": { "lastModified": 1782175435, "narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=", @@ -1570,22 +1656,6 @@ "type": "github" } }, - "nixpkgs_19": { - "locked": { - "lastModified": 1770107345, - "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1788179007, @@ -1603,6 +1673,22 @@ } }, "nixpkgs_20": { + "locked": { + "lastModified": 1770107345, + "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_21": { "locked": { "lastModified": 1774386573, "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", @@ -1790,8 +1876,8 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_15" + "flake-parts": "flake-parts_6", + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1789832263, @@ -1809,7 +1895,7 @@ }, "opencode": { "inputs": { - "nixpkgs": "nixpkgs_16" + "nixpkgs": "nixpkgs_17" }, "locked": { "lastModified": 1789828307, @@ -1959,11 +2045,12 @@ "lanzaboote": "lanzaboote", "llm-agents": "llm-agents", "mango": "mango", + "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-index-database": "nix-index-database", "nix-on-droid": "nix-on-droid", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_14", + "nixpkgs": "nixpkgs_15", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur", "opencode": "opencode", @@ -2122,7 +2209,7 @@ }, "serpantinum": { "inputs": { - "nixpkgs": "nixpkgs_17", + "nixpkgs": "nixpkgs_18", "serpantinum-wallpapers": "serpantinum-wallpapers" }, "locked": { @@ -2157,7 +2244,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_18" + "nixpkgs": "nixpkgs_19" }, "locked": { "lastModified": 1789815532, @@ -2280,7 +2367,7 @@ }, "tfolio": { "inputs": { - "flake-parts": "flake-parts_6", + "flake-parts": "flake-parts_7", "nixpkgs": [ "nixpkgs" ], @@ -2385,7 +2472,7 @@ }, "treefmt-nix_4": { "inputs": { - "nixpkgs": "nixpkgs_19" + "nixpkgs": "nixpkgs_20" }, "locked": { "lastModified": 1786901030, @@ -2445,7 +2532,7 @@ }, "trok": { "inputs": { - "flake-parts": "flake-parts_7", + "flake-parts": "flake-parts_8", "nixpkgs": [ "nixpkgs" ], @@ -2572,7 +2659,7 @@ }, "vicinae-extensions": { "inputs": { - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_7", "nixpkgs": [ "nixpkgs" ], @@ -2596,7 +2683,7 @@ "voxtype": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_20" + "nixpkgs": "nixpkgs_21" }, "locked": { "lastModified": 1780004034, diff --git a/flake.nix b/flake.nix index 310fee3..51fc8bc 100644 --- a/flake.nix +++ b/flake.nix @@ -83,6 +83,7 @@ nixos-hardware.url = "github:NixOS/nixos-hardware/master"; sops-nix.url = "github:Mic92/sops-nix"; treefmt-nix.url = "github:numtide/treefmt-nix"; + nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; lan-mouse.url = "github:feschber/lan-mouse"; hyprland.url = "github:hyprwm/Hyprland"; awww.url = "git+https://codeberg.org/LGFae/awww"; diff --git a/modules/flake/overlays.nix b/modules/flake/overlays.nix index 9fb8284..fb0d9ee 100644 --- a/modules/flake/overlays.nix +++ b/modules/flake/overlays.nix @@ -36,6 +36,7 @@ }; }; + cachyos-kernel = inputs.nix-cachyos-kernel.overlays.pinned; nur = inputs.nur.overlays.default; copyparty = inputs.copyparty.overlays.default; llm-agents = inputs.llm-agents.overlays.shared-nixpkgs; diff --git a/modules/hosts/alpha/hardware.nix b/modules/hosts/alpha/hardware.nix index 1eb14c9..c89cc5d 100644 --- a/modules/hosts/alpha/hardware.nix +++ b/modules/hosts/alpha/hardware.nix @@ -1,5 +1,6 @@ { flake.modules.nixos.alpha = { + pkgs, lib, modulesPath, system, @@ -9,6 +10,7 @@ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.kernelPackages = pkgs.linuxPackages_zen; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault system; }; diff --git a/modules/hosts/arcturus/hardware.nix b/modules/hosts/arcturus/hardware.nix index a1069d2..8f6a22b 100644 --- a/modules/hosts/arcturus/hardware.nix +++ b/modules/hosts/arcturus/hardware.nix @@ -9,6 +9,7 @@ hardware ]; + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-zen4; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" diff --git a/modules/hosts/canopus/hardware.nix b/modules/hosts/canopus/hardware.nix index 958e8c1..78d178c 100644 --- a/modules/hosts/canopus/hardware.nix +++ b/modules/hosts/canopus/hardware.nix @@ -18,6 +18,7 @@ inputs.cardwire.nixosModules.default ]; + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-bore-lto-x86_64-v3; boot.kernelParams = ["nvidia-drm.modeset=1"]; boot.initrd.availableKernelModules = [ "nvme" diff --git a/modules/hosts/sirius/hardware.nix b/modules/hosts/sirius/hardware.nix index c8da5b8..d7228f1 100644 --- a/modules/hosts/sirius/hardware.nix +++ b/modules/hosts/sirius/hardware.nix @@ -17,6 +17,7 @@ inputs.cardwire.nixosModules.default ]; + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-bore-lto-x86_64-v3; boot.kernelParams = ["nvidia-drm.modeset=1"]; boot.initrd.availableKernelModules = [ "nvme" diff --git a/modules/hosts/vps/hardware.nix b/modules/hosts/vps/hardware.nix index b82e30c..7043022 100644 --- a/modules/hosts/vps/hardware.nix +++ b/modules/hosts/vps/hardware.nix @@ -1,5 +1,6 @@ { flake.modules.nixos.vps = { + pkgs, lib, modulesPath, system, @@ -9,6 +10,7 @@ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.kernelPackages = pkgs.linuxPackages_zen; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault system; }; diff --git a/modules/nixos/boot/misc.nix b/modules/nixos/boot/misc.nix index 7571293..ca7dfd4 100644 --- a/modules/nixos/boot/misc.nix +++ b/modules/nixos/boot/misc.nix @@ -1,9 +1,8 @@ { - flake.modules.nixos.boot = {pkgs, ...}: { + flake.modules.nixos.boot = { boot = { consoleLogLevel = 0; initrd.verbose = false; - kernelPackages = pkgs.linuxPackages_zen; supportedFilesystems = ["ntfs"]; }; }; diff --git a/modules/nixos/core/substituters.nix b/modules/nixos/core/substituters.nix index ea1400a..c581cf5 100644 --- a/modules/nixos/core/substituters.nix +++ b/modules/nixos/core/substituters.nix @@ -14,6 +14,7 @@ "https://lan-mouse.cachix.org" "https://wezterm.cachix.org" "https://cache.nixos-cuda.org" + "https://attic.xuyh0120.win/lantian" ]; trusted-substituters = [ "https://nix-on-droid.cachix.org" @@ -32,6 +33,7 @@ "lan-mouse.cachix.org-1:KlE2AEZUgkzNKM7BIzMQo8w9yJYqUpor1CAUNRY6OyM=" "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ]; extra-substituters = ["https://cache.numtide.com"]; extra-trusted-public-keys = [