2023-01-31 17:20:23 +01:00
|
|
|
{ config, pkgs, ... }: {
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
2022-11-11 11:54:21 +01:00
|
|
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
2022-11-11 12:51:48 +01:00
|
|
|
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
|
2023-02-03 14:33:15 +01:00
|
|
|
# boot.kernelParams = [ "amd_pstate.shared_mem=1" ];
|
2022-11-11 12:51:48 +01:00
|
|
|
boot.extraModulePackages = [ ] ++
|
2023-02-03 14:33:15 +01:00
|
|
|
(with config.boot.kernelPackages; [ rtl88x2bu zenpower cpupower ]);
|
2022-11-11 12:51:48 +01:00
|
|
|
|
2022-11-17 14:06:39 +01:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/nixos";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
|
2022-11-17 14:06:39 +01:00
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/disk/by-label/boot";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
|
2022-11-17 14:06:39 +01:00
|
|
|
fileSystems."/home" = {
|
|
|
|
device = "/dev/disk/by-label/home";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/yocto" = {
|
|
|
|
device = "/dev/disk/by-label/yocto";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
|
|
|
|
swapDevices =
|
2022-11-17 14:06:39 +01:00
|
|
|
[{ device = "/dev/disk/by-label/swap"; }];
|
2022-11-11 11:54:21 +01:00
|
|
|
|
2022-11-11 12:51:48 +01:00
|
|
|
powerManagement.cpuFreqGovernor = "ondemand";
|
2023-02-03 14:33:15 +01:00
|
|
|
|
2022-11-11 12:51:48 +01:00
|
|
|
hardware = {
|
2023-03-29 16:19:20 +02:00
|
|
|
# Renamed to fonts.optimizeForVeryHighDPI
|
|
|
|
# video.hidpi.enable = true;
|
2022-11-11 12:51:48 +01:00
|
|
|
enableAllFirmware = true;
|
2022-12-22 11:35:17 +01:00
|
|
|
nvidia = {
|
|
|
|
modesetting.enable = true;
|
|
|
|
powerManagement.enable = true;
|
|
|
|
forceFullCompositionPipeline = true;
|
|
|
|
};
|
2022-11-11 12:51:48 +01:00
|
|
|
|
|
|
|
opengl = {
|
2022-12-09 10:40:13 +01:00
|
|
|
driSupport32Bit = true;
|
2022-11-11 12:51:48 +01:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
vaapiVdpau
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
|
2022-12-01 10:17:56 +01:00
|
|
|
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"
|
|
|
|
'';
|
2022-12-09 10:40:13 +01:00
|
|
|
|
|
|
|
libinput = {
|
|
|
|
enable = true;
|
|
|
|
mouse = {
|
|
|
|
naturalScrolling = true;
|
|
|
|
accelSpeed = "1.0";
|
|
|
|
};
|
|
|
|
};
|
2022-12-01 10:17:56 +01:00
|
|
|
};
|
2022-11-11 11:54:21 +01:00
|
|
|
}
|