nixos-config/machines/mayushii/hardware-configuration.nix
Simon Bruder b5782f633c
mayushii: Add power saving configuration
When booted with my mouse connected to my kvm switch connected to my
dock connected to mayushii, powertop’s default configuration enables
power saving features that disable the mouse until it registers a click.

My current workaround is to unplug and plug the dock, so the hot-plug
input devices connected to it are reset.
2021-10-05 22:53:49 +02:00

57 lines
1.3 KiB
Nix

{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
kernelModules = [ "kvm-amd" ];
loader = {
grub.enable = false;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "aesni_intel" "cryptd" "nvme" "sd_mod" "sdhci_pci" "usb_storage" "xhci_pci" ];
luks.devices = {
root = {
name = "root";
device = "/dev/disk/by-uuid/16d97095-34d2-4422-819c-d1ddc9c3ce1e";
preLVM = true;
allowDiscards = true;
};
};
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/cd7ed921-4b59-4de4-b39e-9679571ce034";
fsType = "btrfs";
options = [ "discard=async" "noatime" "compress=zstd" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/861A-D1A2";
fsType = "vfat";
};
};
powerManagement = {
cpuFreqGovernor = "schedutil";
powertop.enable = true;
};
services.tlp.enable = true;
# Most of the time I want to use both screens at the same time and suspend it
# regularily by closing the lid
services.logind.lidSwitchDocked = config.services.logind.lidSwitch;
hardware.trackpoint = {
enable = true;
device = "TPPS/2 Elan TrackPoint";
sensitivity = 255;
};
}