2023-06-11 23:09:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
{ pkgs, lib, inputs', ... }:
|
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
singleton
|
|
|
|
mkForce;
|
|
|
|
|
2023-09-28 14:42:44 +02:00
|
|
|
kernelPackages = pkgs.zfsUnstable.latestCompatibleLinuxPackages;
|
2023-06-11 23:09:59 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
environment.systemPackages = [
|
|
|
|
kernelPackages.turbostat
|
|
|
|
];
|
|
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
|
|
|
|
boot = {
|
2023-10-03 16:55:14 +02:00
|
|
|
initrd.systemd.enable = true;
|
2023-06-11 23:09:59 +02:00
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"ahci"
|
|
|
|
"usb_storage"
|
|
|
|
"sr_mod"
|
|
|
|
"rtsx_pci_sdmmc"
|
|
|
|
"nvme"
|
|
|
|
"vmd"
|
|
|
|
];
|
|
|
|
initrd.kernelModules = [];
|
|
|
|
kernelModules = singleton "kvm-intel";
|
|
|
|
|
|
|
|
kernelParams = [
|
|
|
|
"zfs.zfs_arc_max=8589934592"
|
|
|
|
"zfs.zfs_arc_sys_free=3221225472"
|
|
|
|
# "intel_pstate=active"
|
|
|
|
"nvidia.NVreg_EnableS0ixPowerManagement=1"
|
|
|
|
"nvidia.NVreg_S0ixPowerManagementVideoMemoryThreshold=2048"
|
|
|
|
# "nvme.noacpi=1"
|
|
|
|
"nvme_core.default_ps_max_latency_us=30000"
|
|
|
|
];
|
|
|
|
kernelPackages = kernelPackages;
|
|
|
|
|
|
|
|
zfs.enableUnstable = true;
|
|
|
|
supportedFilesystems = singleton "zfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
hardware.nvidia.package = kernelPackages.nvidia_x11_beta;
|
|
|
|
|
|
|
|
hardware.tuxedo-keyboard.enable = true;
|
|
|
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
nvidiaPersistenced = true;
|
|
|
|
|
|
|
|
powerManagement.enable = true;
|
|
|
|
powerManagement.finegrained = true;
|
|
|
|
|
2023-06-12 23:25:40 +02:00
|
|
|
prime.reverseSync.enable = false;
|
2023-06-11 23:09:59 +02:00
|
|
|
prime.offload.enable = true;
|
|
|
|
|
|
|
|
modesetting.enable = true;
|
|
|
|
};
|
|
|
|
}
|