Powermanagement tweaking

This commit is contained in:
Erwin Boskma 2023-01-31 17:13:02 +01:00
parent 1292bde8eb
commit 363e7678c6
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
5 changed files with 24 additions and 17 deletions

View file

@ -25,7 +25,7 @@
base = {
plymouth.enable = true;
work = false;
kernel = pkgs.linuxKernel.packages.linux_6_0;
kernel = pkgs.linuxKernel.packages.linux_6_1;
udev-rules = {
qmk = true;
solo2 = true;
@ -262,6 +262,7 @@
programs.ssh.startAgent = true;
services.envfs.enable = true;
services.cpupower-gui.enable = true;
services.sunshine = {
enable = true;
@ -269,11 +270,14 @@
openFirewall = true;
};
powerManagement.powerUpCommands = ''
powerManagement = {
powerUpCommands = ''
${pkgs.powertop}/bin/powertop --auto-tune
${pkgs.coreutils}/bin/echo 'on' > /sys/bus/usb/devices/5-4.2/power/control # Logitech G502 HERO SE
${pkgs.coreutils}/bin/echo 'on' > /sys/bus/usb/devices/5-4.1/power/control # splitkb Kyria rev1
'';
cpuFreqGovernor = "ondemand";
};
services.nfs.server = {
enable = true;

View file

@ -1,16 +1,10 @@
{ config
, lib
, ...
}: {
{ config, lib, ... }: {
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" "nf_nat_ftp" ];
boot.kernelParams = [ "amd_pstate.shared_mem=1" ];
boot.extraModulePackages = [ ] ++
(with config.boot.kernelPackages; [ rtl88x2bu zenpower ]);
boot.extraModprobeConfig = ''
options amd-pstate shared_mem=true
'';
(with config.boot.kernelPackages; [ rtl88x2bu zenpower cpupower ]);
fileSystems."/" = {
device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac";
@ -34,4 +28,7 @@
# Enable firmware
hardware.enableAllFirmware = true;
# i2c support
hardware.i2c.enable = true;
}

View file

@ -73,6 +73,7 @@ in
environment.systemPackages = with pkgs; [
clinfo
config.boot.kernelPackages.cpupower
dig
du-dust
file
@ -82,6 +83,8 @@ in
moreutils
nix-template
nvd
s-tui
stress
usbutils
xh
zip

View file

@ -25,7 +25,8 @@ in
users.users.erwin = {
isNormalUser = true;
home = "/home/erwin";
extraGroups = [ "wheel" "adm" "audio" "video" "dialout" "input" ];
extraGroups = [ "wheel" "adm" "audio" "video" "dialout" "input" ]
++ (optional config.hardware.i2c.enable config.hardware.i2c.group);
shell = pkgs.fish;
openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {

View file

@ -238,6 +238,8 @@ in
programs.steam.enable = true;
programs.bandwhich.enable = true;
services.ddccontrol.enable = true;
programs.wireshark = {
enable = true;
package = pkgs.wireshark;