Fix networking and add battery fixes

This commit is contained in:
stitchy 2024-02-24 04:15:58 +00:00
parent ef43bdd881
commit 56cedd8584
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -10,8 +10,23 @@
system.nixos.tags = [ "Nya_Beginnings" ];
networking.hostName = "lappy";
networking.networkmanager.enable = true;
services.resolved = {
enable = true;
dnsovertls = "opportunistic";
fallbackDns = [
"2620:fe::10#dns10.quad9.net"
"2620:fe::fe:10#dns10.quad9.net"
"9.9.9.10#dns10.quad9.net"
"149.112.112.10#dns10.quad9.net"
];
extraConfig = ''
DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net
'';
};
networking = {
hostName = "lappy";
networkmanager.enable = true;
};
time.timeZone = "America/Lost_Angeles";
boot.kernelParams = [
@ -27,12 +42,41 @@
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
];
};
systemd.extraConfig =
"AllowedCPUs=8-15"
;
services.tlp = {
enable = true;
settings = {
TLP_DEFAULT_MODE = "BAT";
TLP_PERSISTENT_DEFAULT = 1;
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 30;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging
};
};
# Read the Docs before Changing
system.stateVersion = "23.05";
}