Gen 402: created system config for my laptop
This commit is contained in:
69
glasshouse-laptop/sys/default.nix
Normal file
69
glasshouse-laptop/sys/default.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{ inputs, pkgs, config, self, username, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (import ./bootloader.nix) ]
|
||||
++ [ (import ./fonts.nix) ]
|
||||
++ [ (import ./hardware.nix) ]
|
||||
++ [ (import ./network.nix) ]
|
||||
++ [ (import ./packages.nix) ]
|
||||
++ [ (import ./programs.nix) ]
|
||||
++ [ (import ./services.nix) ]
|
||||
++ [ (import ./system.nix) ]
|
||||
++ [ (import ./users.nix) ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
acpi
|
||||
brightnessctl
|
||||
cpupower-gui
|
||||
powertop
|
||||
];
|
||||
|
||||
services = {
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
upower = {
|
||||
enable = true;
|
||||
percentageLow = 20;
|
||||
percentageCritical = 5;
|
||||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "performance";
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC=500;
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT=500;
|
||||
# INTEL_GPU_MAX_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
|
||||
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
|
||||
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
};
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
extraModulePackages = with config.boot.kernelPackages;
|
||||
[
|
||||
acpi_call
|
||||
cpupower
|
||||
]
|
||||
++ [pkgs.cpupower-gui];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user