Compare commits

...

3 Commits

Author SHA1 Message Date
Alexandre
03c50a8504 Tweaked nix build parameters 2026-03-22 16:01:17 +01:00
Alexandre
e04ca593a2 Fixed a typo 2026-03-22 15:24:49 +01:00
Alexandre
46c7a83fcd Added a CahyOS kernel in a module 2026-03-22 15:24:16 +01:00
6 changed files with 174 additions and 18 deletions

149
flake.lock generated
View File

@ -55,6 +55,38 @@
"url": "https://codeberg.org/LGFae/awww"
}
},
"cachyos-kernel": {
"flake": false,
"locked": {
"lastModified": 1773637879,
"narHash": "sha256-hFKu2SaRoqt6+zbmcFW6A0AbBENIX8XooJLXQWa3sLc=",
"owner": "CachyOS",
"repo": "linux-cachyos",
"rev": "fa09a5bc69d3e7feeed9b1402c7df06c8170402a",
"type": "github"
},
"original": {
"owner": "CachyOS",
"repo": "linux-cachyos",
"type": "github"
}
},
"cachyos-kernel-patches": {
"flake": false,
"locked": {
"lastModified": 1773635524,
"narHash": "sha256-JErpxWTdoHq4JuDerfsbPA60FmWOxK4oX9UL9CcsP/Q=",
"owner": "CachyOS",
"repo": "kernel-patches",
"rev": "5544a0679fd6f6fb714e275514449c4ab9db2a53",
"type": "github"
},
"original": {
"owner": "CachyOS",
"repo": "kernel-patches",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1772080396,
@ -134,7 +166,41 @@
"type": "github"
}
},
"flake-compat_5": {
"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": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nix-citizen",
@ -155,9 +221,9 @@
"type": "github"
}
},
"flake-parts_2": {
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1769996383,
@ -173,7 +239,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -196,7 +262,7 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_5",
"gitignore": "gitignore_3",
"nixpkgs": [
"nix-citizen",
@ -650,9 +716,32 @@
"type": "github"
}
},
"nix-cachyos-kernel": {
"inputs": {
"cachyos-kernel": "cachyos-kernel",
"cachyos-kernel-patches": "cachyos-kernel-patches",
"flake-compat": "flake-compat_4",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1773804995,
"narHash": "sha256-LL6EG35pbxgjsqYIpwUnpHGDmKFYttE+BILBNhsEaJk=",
"owner": "xddxdd",
"repo": "nix-cachyos-kernel",
"rev": "3286b7ecf1d864e2be050af78aa633d4e3ae8fdb",
"type": "github"
},
"original": {
"owner": "xddxdd",
"ref": "release",
"repo": "nix-cachyos-kernel",
"type": "github"
}
},
"nix-citizen": {
"inputs": {
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"nix-gaming": "nix-gaming",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
@ -698,7 +787,7 @@
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"git-hooks": "git-hooks",
"nixpkgs": [
"nix-citizen",
@ -758,21 +847,36 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "nixos",
"lastModified": 1773738184,
"narHash": "sha256-zWRjT5oPabNCiC1A3QkFXpfnsgUjyg6fUZWC+IiiZH0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"rev": "41a2715cc472025a19bc0eb9dc4ee8b7406bfa6f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1772328832,
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
@ -787,9 +891,25 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
],
@ -881,10 +1001,11 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"lanzaboote": "lanzaboote",
"nix-cachyos-kernel": "nix-cachyos-kernel",
"nix-citizen": "nix-citizen",
"nix-darwin": "nix-darwin",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"quickshell": "quickshell",
"sops-nix": "sops-nix",

View File

@ -12,6 +12,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Custom Kernel
nix-cachyos-kernel = {
url = "github:xddxdd/nix-cachyos-kernel/release";
};
# Hyprland
hyprland = {
url = "github:hyprwm/Hyprland";

View File

@ -11,6 +11,7 @@ in
modules.nixos.secrets
modules.nixos.desktop.bluetooth
modules.nixos.desktop.utils
modules.nixos.gaming.kernel
modules.nixos.gaming.amd
modules.nixos.gaming.starCitizen
modules.nixos.gaming.steam

View File

@ -10,11 +10,11 @@
experimental-features = [ "nix-command" "flakes" ];
# Limit resource usage to prevent Linux OOM
max-jobs = 2;
cores = 4;
max-jobs = 4;
cores = 5;
max-silent-time = 3600;
timeout = 1800;
timeout = 2700;
# Package caches
substituters = [

View File

@ -36,6 +36,7 @@
steam = ./nixos/gaming/steam.nix;
vr = ./nixos/gaming/vr.nix;
mod = ./nixos/gaming/mod.nix;
kernel = ./nixos/gaming/kernel.nix;
};
bootloader = ./nixos/bootloader.nix;

View File

@ -0,0 +1,29 @@
{ pkgs, inputs, lib, ... }:
let
helpers = pkgs.callPackage "${inputs.nix-cachyos-kernel.outPath}/helpers.nix" {};
cachyKernel = pkgs.cachyosKernels.linux-cachyos-bore-lto.override {
cpusched = "bore";
lto = "thin";
processorOpt = "x86_64-v3";
hzTicks = "1000";
tickrate = "full";
preemptType = "full";
bbr3 = true;
ccHarder = true;
hugepage = "always";
};
in {
nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ];
boot.kernelPackages = helpers.kernelModuleLLVMOverride (
pkgs.linuxKernel.packagesFor cachyKernel
);
nix.settings = {
substituters = lib.mkAfter [
"https://attic.xuyh0120.win/lantian"
];
trusted-public-keys = lib.mkAfter [
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
];
};
}