From 933811ad5b0575892509b55939f98129c3332048 Mon Sep 17 00:00:00 2001 From: Satria Date: Sun, 15 Feb 2026 09:24:02 +0700 Subject: [PATCH 1/2] cpu scaling bug temp fix and update --- flake.lock | 18 +++++++++--------- modules/hardware/misc/cpu-thermal.nix | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 1e6bb19..19d1505 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1770388745, - "narHash": "sha256-tmAONUMNHnlkozNcMR1kZJ/68OGea5wS56vl6vaUS5U=", + "lastModified": 1770551880, + "narHash": "sha256-+cS5yXWsSLiK36+PP/+dcQdxpXSclx2d65p7l6Dis+A=", "owner": "catppuccin", "repo": "nix", - "rev": "5e9efb97caeffea3bf248023b6d8b68e63b839b9", + "rev": "db4dfe3f2a80e9c33492d839accd49f75c7324c2", "type": "github" }, "original": { @@ -62,11 +62,11 @@ ] }, "locked": { - "lastModified": 1770491427, - "narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=", + "lastModified": 1771037579, + "narHash": "sha256-NX5XuhGcsmk0oEII2PEtMRgvh2KaAv3/WWQsOpxAgR4=", "owner": "nix-community", "repo": "home-manager", - "rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860", + "rev": "05e6dc0f6ed936f918cb6f0f21f1dad1e4c53150", "type": "github" }, "original": { @@ -109,11 +109,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1770197578, - "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", "type": "github" }, "original": { diff --git a/modules/hardware/misc/cpu-thermal.nix b/modules/hardware/misc/cpu-thermal.nix index 6aa804c..b1a86e6 100644 --- a/modules/hardware/misc/cpu-thermal.nix +++ b/modules/hardware/misc/cpu-thermal.nix @@ -2,20 +2,31 @@ services = { thermald.enable = false; throttled.enable = true; + power-profiles-daemon.enable = true; # replacement for tlp and auto-cpufreq due to bugs tlp = { - enable = true; + enable = false; # buggy and inconsistent with frequency scaling settings = { TLP_DEFAULT_MODE = "BAL"; CPU_SCALING_GOVERNOR_ON_PRF = "performance"; CPU_ENERGY_PERF_POLICY_ON_PRF = "performance"; CPU_BOOST_ON_PRF = "1"; + CPU_MAX_FREQ_ON_PRF = "3600000"; + CPU_MIN_FREQ_ON_PRF = "100000"; + CPU_MIN_PERF_ON_PRF = "40"; + CPU_MAX_PERF_ON_PRF = "100"; PLATFORM_PROFILE_ON_PRF = "performance"; + MEM_SLEEP_ON_PRF = "s2idle"; CPU_SCALING_GOVERNOR_ON_BAL = "powersave"; CPU_ENERGY_PERF_POLICY_ON_BAL = "balance_power"; CPU_BOOST_ON_BAL = "0"; + CPU_MAX_FREQ_ON_BAL = "1700000"; + CPU_MIN_FREQ_ON_BAL = "800000"; + CPU_MIN_PERF_ON_BAL = "40"; + CPU_MAX_PERF_ON_BAL = "80"; PLATFORM_PROFILE_ON_BAL = "balanced"; + MEM_SLEEP_ON_BAL = "s2idle"; CPU_SCALING_GOVERNOR_ON_SAV = "powersave"; CPU_ENERGY_PERF_POLICY_ON_SAV = "power"; @@ -39,7 +50,7 @@ }; }; auto-cpufreq = { - enable = false; # replaced with tlp until fix: https://github.com/AdnanHodzic/auto-cpufreq/issues/906 + enable = false; # wait for fix: https://github.com/AdnanHodzic/auto-cpufreq/issues/906 settings = { charger = { governor = "performance"; From 4ac94914664cb37b39cc2b164d738bf96b268fd7 Mon Sep 17 00:00:00 2001 From: Satria Date: Sun, 15 Feb 2026 09:24:09 +0700 Subject: [PATCH 2/2] tweaks --- modules/home/core/zsh.nix | 14 ++++++++------ modules/home/rice/waybar.nix | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/home/core/zsh.nix b/modules/home/core/zsh.nix index 7c99bba..1c91e4d 100644 --- a/modules/home/core/zsh.nix +++ b/modules/home/core/zsh.nix @@ -21,12 +21,14 @@ autocd = true; syntaxHighlighting.enable = true; envExtra = '' - NIXPKGS_ALLOW_UNFREE=1 - WINEPREFIX="~/.wine" - WINEARCH="win64" - DISPLAY=":0" - EDITOR="nvim" - PORT="3000" + export NIXPKGS_ALLOW_UNFREE=1 + export NIXPKGS_ALLOW_INSECURE=1 + export NH_FLAKE=${flake-path} + export WINEPREFIX="~/.wine" + export WINEARCH="win64" + export DISPLAY=":0" + export EDITOR="nvim" + export PORT="3000" ''; shellAliases = { "cd-gvfs" = "cd /run/user/$(id -u)/gvfs"; diff --git a/modules/home/rice/waybar.nix b/modules/home/rice/waybar.nix index 5fe76b4..8481f4f 100644 --- a/modules/home/rice/waybar.nix +++ b/modules/home/rice/waybar.nix @@ -258,9 +258,9 @@ font-weight: normal; } - .critical, .muted, .performance { color: @red; } - .warning, .urgent, .disabled, .disconnected, .paused { color: @yellow; } - .charging, .plugged, .power-saver { color: @green; } + .critical, .muted, .performance { border-color: @red; color: @red; } + .warning, .urgent, .disabled, .disconnected, .paused { border-color: @yellow; color: @yellow; } + .charging, .plugged, .power-saver { border-color: @green; color: @green; } ''; }; }