From 77b7e90166f77ffe2eaefb6d5dca8f69d19250ec Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 9 Feb 2026 14:35:20 +0100 Subject: [PATCH] feat: adopt performance tweaks from cachyos. --- hosts/skadi/configuration.nix | 15 +++++++++++++++ hosts/skadi/home.nix | 1 + modules/linux/nixos/boot.nix | 11 ++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/hosts/skadi/configuration.nix b/hosts/skadi/configuration.nix index 2483052..076664f 100644 --- a/hosts/skadi/configuration.nix +++ b/hosts/skadi/configuration.nix @@ -42,6 +42,18 @@ scheduler = "scx_bpfland"; }; + # Setup ananicy with cachyos rules + services.ananicy = { + enable = true; + package = pkgs.ananicy-cpp; + rulesProvider = pkgs.ananicy-rules-cachyos; + }; + + # Setup power profiles daemon + services.power-profiles-daemon = { + enable = true; + }; + # Get nicer hostname networking.hostName = "skadi"; # Define your hostname. @@ -71,6 +83,9 @@ settings.Resolve.FallbackDns = ["192.168.0.5"]; }; + # Enable bpftune for better networking + services.bpftune.enable = true; + # Set your time zone. time.timeZone = "Europe/Zagreb"; diff --git a/hosts/skadi/home.nix b/hosts/skadi/home.nix index 1c1ec4b..e0599e5 100644 --- a/hosts/skadi/home.nix +++ b/hosts/skadi/home.nix @@ -22,6 +22,7 @@ TERMINAL = "foot"; WINEPREFIX = "$HOME/.local/share/wineprefix/default"; SECOND_BRAIN = "$HOME/docs/sb"; + __GL_SHADER_DISK_CACHE_SIZE = "12000000000"; }; # Let Home Manager install and manage itself. diff --git a/modules/linux/nixos/boot.nix b/modules/linux/nixos/boot.nix index 15c2257..3fc5f24 100644 --- a/modules/linux/nixos/boot.nix +++ b/modules/linux/nixos/boot.nix @@ -9,7 +9,16 @@ config = lib.mkIf config.crony.boot.enable { boot.kernel.sysctl = { - "vm.swappiness" = 10; + # Cachy os adopted values + "vm.swappiness" = 100; + "vm.vfs_cache_pressure" = 50; + "vm.dirty_bytes" = 268435456; + "vm.page-cluster" = 1; + "vm.dirty_background_bytes" = 67108864; + "vm.dirty_writeback_centisecs" = 1500; + "net.core.netdev_max_backlog" = 4096; + "fs.file-max" = 2097152; + # Disable watchdog "kernel.nmi_watchdog" = 0; }; boot.kernelParams = ["quiet"];