Compare commits
5 commits
d4c0043a05
...
a1653874cb
| Author | SHA1 | Date | |
|---|---|---|---|
| a1653874cb | |||
| 460fed40e7 | |||
| b9a2ccc222 | |||
| 49d39cee9c | |||
| d9982d992f |
6 changed files with 67 additions and 19 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
services = {
|
services = {
|
||||||
thermald.enable = false;
|
|
||||||
throttled.enable = true;
|
|
||||||
power-profiles-daemon.enable = false; # replacement for tlp and auto-cpufreq due to bugs
|
power-profiles-daemon.enable = false; # replacement for tlp and auto-cpufreq due to bugs
|
||||||
tlp = {
|
tlp = {
|
||||||
enable = false; # buggy and inconsistent with frequency scaling
|
enable = false; # buggy and inconsistent with frequency scaling
|
||||||
|
|
@ -55,29 +53,20 @@
|
||||||
charger = {
|
charger = {
|
||||||
governor = "performance";
|
governor = "performance";
|
||||||
energy_performance_preference = "performance";
|
energy_performance_preference = "performance";
|
||||||
turbo = "auto";
|
turbo = "always";
|
||||||
platform_profile = "performance";
|
platform_profile = "performance";
|
||||||
scaling_min_freq = 800000;
|
scaling_min_freq = 800000;
|
||||||
scaling_max_freq = 3600000;
|
scaling_max_freq = 3600000;
|
||||||
};
|
};
|
||||||
battery = {
|
battery = {
|
||||||
governor = "powersave";
|
governor = "powersave";
|
||||||
energy_performance_preference = "power";
|
energy_performance_preference = "balance-power";
|
||||||
platform_profile = "low-power";
|
platform_profile = "low-power";
|
||||||
turbo = "never";
|
turbo = "never";
|
||||||
scaling_min_freq = 400000;
|
scaling_min_freq = 400000;
|
||||||
scaling_max_freq = 1000000;
|
scaling_max_freq = 1700000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
thinkfan = {
|
|
||||||
enable = true;
|
|
||||||
levels = [
|
|
||||||
[ "level auto" 0 55 ]
|
|
||||||
[ 3 55 65 ]
|
|
||||||
[ 7 65 75 ]
|
|
||||||
[ "level full-speed" 75 100 ]
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./misc/battery-power.nix
|
./misc/battery-power.nix
|
||||||
./misc/power-button.nix
|
./misc/power-button.nix
|
||||||
./misc/cpu-thermal.nix
|
./misc/cpu-freq.nix
|
||||||
./misc/tzupdate.nix
|
./misc/tzupdate.nix
|
||||||
./core/hibernation.nix
|
./core/hibernation.nix
|
||||||
./core/firmware.nix
|
./core/firmware.nix
|
||||||
|
|
@ -14,10 +14,64 @@
|
||||||
kernelPackages = pkgs.linuxPackages;
|
kernelPackages = pkgs.linuxPackages;
|
||||||
kernel.sysctl."vm.laptop_mode" = 5;
|
kernel.sysctl."vm.laptop_mode" = 5;
|
||||||
initrd.availableKernelModules = [ "thinkpad_acpi" ];
|
initrd.availableKernelModules = [ "thinkpad_acpi" ];
|
||||||
|
kernelParams = [
|
||||||
|
"i915.enable_psr=1"
|
||||||
|
"pcie_aspm=force"
|
||||||
|
"nmi_watchdog=0"
|
||||||
|
# ^^ potential instability, but improves battery life
|
||||||
|
|
||||||
|
"loglevel=3"
|
||||||
|
"i915.enable_guc=3"
|
||||||
|
"i915.enable_fbc=1"
|
||||||
|
"msr.allow-writes=on"
|
||||||
|
"nvme_core.default_ps_max_latency_us=0"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = false;
|
powerOnBoot = false;
|
||||||
};
|
};
|
||||||
services.hardware.bolt.enable = true;
|
services = {
|
||||||
|
throttled = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[GENERAL]
|
||||||
|
Enabled: True
|
||||||
|
Update_Rate_s: 30
|
||||||
|
|
||||||
|
[BATTERY]
|
||||||
|
Update_Rate_s: 30
|
||||||
|
PL1_Tdp_W: 12
|
||||||
|
PL1_Duration_s: 28
|
||||||
|
PL2_Tdp_W: 20
|
||||||
|
PL2_Duration_s: 0.002
|
||||||
|
Trip_Temp_C: 85
|
||||||
|
|
||||||
|
[AC]
|
||||||
|
Update_Rate_s: 5
|
||||||
|
PL1_Tdp_W: 25
|
||||||
|
PL1_Duration_s: 28
|
||||||
|
PL2_Tdp_W: 35
|
||||||
|
PL2_Duration_s: 0.002
|
||||||
|
Trip_Temp_C: 90
|
||||||
|
|
||||||
|
[UNDERVOLT]
|
||||||
|
CORE: -100
|
||||||
|
GPU: -80
|
||||||
|
CACHE: -100
|
||||||
|
UNCORE: -80
|
||||||
|
ANALOGIO: 0
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
thinkfan = {
|
||||||
|
enable = true;
|
||||||
|
levels = [
|
||||||
|
[ "level auto" 0 55 ]
|
||||||
|
[ 3 55 65 ]
|
||||||
|
[ 7 65 75 ]
|
||||||
|
[ "level full-speed" 75 100 ]
|
||||||
|
];
|
||||||
|
};
|
||||||
|
hardware.bolt.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
nwg-displays
|
nwg-displays
|
||||||
lxqt.pcmanfm-qt
|
lxqt.pcmanfm-qt
|
||||||
hyprshot wl-clipboard cliphist
|
hyprshot wl-clipboard cliphist
|
||||||
|
hyprshutdown
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@
|
||||||
"no_anim on, match:namespace selection" # hyprshot overlay
|
"no_anim on, match:namespace selection" # hyprshot overlay
|
||||||
"animation fade, match:namespace swww-daemon"
|
"animation fade, match:namespace swww-daemon"
|
||||||
"animation fade, match:namespace logout_dialog"
|
"animation fade, match:namespace logout_dialog"
|
||||||
|
"animation fade, match:namespace hyprshutdown"
|
||||||
"above_lock 1, match:namespace waybar"
|
"above_lock 1, match:namespace waybar"
|
||||||
"above_lock 2, match:namespace notifications"
|
"above_lock 2, match:namespace notifications"
|
||||||
"above_lock 2, match:namespace selection"
|
"above_lock 2, match:namespace selection"
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@
|
||||||
layout = [
|
layout = [
|
||||||
{
|
{
|
||||||
label = "shutdown";
|
label = "shutdown";
|
||||||
action = "systemctl poweroff";
|
action = "hyprshutdown -t 'Shutting down...' --post-cmd 'systemctl poweroff'";
|
||||||
text = "(S)hutdown";
|
text = "(S)hutdown";
|
||||||
keybind = "s";
|
keybind = "s";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
label = "reboot";
|
label = "reboot";
|
||||||
action = "systemctl reboot";
|
action = "hyprshutdown -t 'Rebooting...' --post-cmd 'systemctl reboot'";
|
||||||
text = "(R)eboot";
|
text = "(R)eboot";
|
||||||
keybind = "r";
|
keybind = "r";
|
||||||
}
|
}
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
label = "logout";
|
label = "logout";
|
||||||
action = "uwsm stop";
|
action = "hyprshutdown -t 'Logging Out...' --post-cmd 'uwsm stop'";
|
||||||
text = "L(o)gout";
|
text = "L(o)gout";
|
||||||
keybind = "o";
|
keybind = "o";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,10 @@
|
||||||
sysstat
|
sysstat
|
||||||
netcat
|
netcat
|
||||||
p7zip
|
p7zip
|
||||||
|
throttled
|
||||||
|
tlp
|
||||||
stress
|
stress
|
||||||
|
stress-ng
|
||||||
wakeonlan
|
wakeonlan
|
||||||
coreutils-full
|
coreutils-full
|
||||||
traceroute
|
traceroute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue