Charlotte 🦝 Delenk
cfc8962db5
Some checks failed
Hydra nixosConfigurations.not522 Hydra build #26488 of nixos-config:pr618:nixosConfigurations.not522
Hydra packages.aarch64-linux.element-web Hydra build #26495 of nixos-config:pr618:packages.aarch64-linux.element-web
Hydra packages.aarch64-linux.element-desktop Hydra build #26494 of nixos-config:pr618:packages.aarch64-linux.element-desktop
Hydra packages.x86_64-linux.element-web Hydra build #26497 of nixos-config:pr618:packages.x86_64-linux.element-web
Hydra packages.x86_64-linux.element-desktop Hydra build #26496 of nixos-config:pr618:packages.x86_64-linux.element-desktop
Hydra nixosConfigurations.not522-installer Hydra build #26489 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra nixosConfigurations.oracle-installer Hydra build #26490 of nixos-config:pr618:nixosConfigurations.oracle-installer
Hydra nixosConfigurations.pc-installer Hydra build #26491 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra nixosConfigurations.thinkrac Hydra build #26493 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.rainbow-resort Hydra build #26492 of nixos-config:pr618:nixosConfigurations.rainbow-resort
59 lines
2.1 KiB
Nix
59 lines
2.1 KiB
Nix
{
|
|
modulesPath,
|
|
nixos-hardware,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
nixos-hardware.nixosModules.lenovo-thinkpad-t470s
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
nixos-hardware.nixosModules.common-gpu-intel
|
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
];
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
boot.initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"nvme"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
];
|
|
isIntelGPU = true;
|
|
boot.initrd.kernelModules = [ ];
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
boot.extraModulePackages = [ ];
|
|
nix.settings.cores = 4;
|
|
# use the lowest frequency possible, to save power
|
|
powerManagement.cpuFreqGovernor = "powersave";
|
|
# lm_sensors who cares
|
|
environment.etc."sysconfig/lm_sensors".text = ''
|
|
# Generated by sensors-detect on Tue Aug 7 10:54:09 2018
|
|
# This file is sourced by /etc/init.d/lm_sensors and defines the modules to
|
|
# be loaded/unloaded.
|
|
#
|
|
# The format of this file is a shell script that simply defines variables:
|
|
# HWMON_MODULES for hardware monitoring driver modules, and optionally
|
|
# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
|
|
|
|
HWMON_MODULES="coretemp"
|
|
'';
|
|
services.thermald.enable = true;
|
|
boot.extraModprobeConfig = ''
|
|
# enable power savings mode of snd_hda_intel
|
|
options snd-hda-intel power_save=1 power_save_controller=y
|
|
# enable power savings mode of igpu, enable framebuffer compression, downclock the LVDS connection
|
|
options i915 i915_enable_rc6=7 i915_enable_fbc=1 lvds_downclock=1
|
|
# automatically suspend USB devices
|
|
options usbcore autosuspend=2
|
|
# Fan control for thinkpads
|
|
options thinkpad_acpi fan_control=1
|
|
'';
|
|
boot.kernel.sysctl = {
|
|
# Probably unnecessary
|
|
"kernel.nmi_watchdog" = "0";
|
|
"vm.laptop_mode" = "5";
|
|
# The kernel flusher threads will periodically wake up and write `old' data out to disk. This
|
|
# tunable expresses the interval between those wakeups, in 100'ths of a second (Default is 500).
|
|
"vm.dirty_writeback_centisecs" = "1500";
|
|
};
|
|
}
|