nixos-config/machines/mimir/hardware-configuration.nix

68 lines
1.7 KiB
Nix

{ config, pkgs, ... }: {
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
# boot.kernelParams = [ "amd_pstate.shared_mem=1" ];
boot.extraModulePackages = [ ] ++
(with config.boot.kernelPackages; [ rtl88x2bu zenpower cpupower ]);
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
fileSystems."/home" = {
device = "/dev/disk/by-label/home";
fsType = "ext4";
};
fileSystems."/yocto" = {
device = "/dev/disk/by-label/yocto";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
powerManagement.cpuFreqGovernor = "ondemand";
hardware = {
# Renamed to fonts.optimizeForVeryHighDPI
# video.hidpi.enable = true;
enableAllFirmware = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
forceFullCompositionPipeline = true;
};
opengl = {
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
];
};
};
services.xserver = {
videoDrivers = [ "nvidia" ];
screenSection = ''
Option "metamodes" "DP-0: nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-4: nvidia-auto-select +3840+0 {ForceFullCompositionPipeline=On, AllowGSYNCCompatible=On}"
Option "TripleBuffer" "On"
'';
libinput = {
enable = true;
mouse = {
naturalScrolling = true;
accelSpeed = "1.0";
};
};
};
}