2024-03-12 22:08:02 -04:00
|
|
|
{
|
2024-04-07 22:16:33 -04:00
|
|
|
config,
|
2024-06-14 21:18:00 -04:00
|
|
|
inputs,
|
2024-04-07 22:16:33 -04:00
|
|
|
lib,
|
2024-06-14 21:18:00 -04:00
|
|
|
pkgs,
|
2024-04-07 22:16:33 -04:00
|
|
|
...
|
|
|
|
}: {
|
2024-06-14 21:18:00 -04:00
|
|
|
boot = {
|
2024-06-22 12:10:36 -04:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
framework-laptop-kmod
|
|
|
|
];
|
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
initrd = {
|
2024-06-22 12:10:36 -04:00
|
|
|
availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
|
2024-06-16 01:11:34 -04:00
|
|
|
kernelModules = ["amdgpu"];
|
2024-06-14 21:18:00 -04:00
|
|
|
};
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
kernelModules = ["amdgpu" "cros_ec" "cros_ec_lpcs" "kvm-amd"];
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
kernelParams = ["amdgpu.abmlevel=0" "amd_pstate=active"];
|
2024-06-14 21:18:00 -04:00
|
|
|
};
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
environment.systemPackages = [pkgs.framework-tool];
|
2024-06-14 21:18:00 -04:00
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
hardware = {
|
|
|
|
cpu.amd.updateMicrocode = true;
|
2024-06-14 21:18:00 -04:00
|
|
|
enableAllFirmware = true;
|
2024-03-14 14:03:11 -04:00
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
opengl = {
|
2024-06-22 12:10:36 -04:00
|
|
|
enable = true;
|
2024-06-14 21:18:00 -04:00
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
|
|
|
extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk];
|
|
|
|
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
|
|
|
|
};
|
2024-06-22 12:10:36 -04:00
|
|
|
|
|
|
|
sensor.iio.enable = true;
|
2024-04-07 22:11:39 -04:00
|
|
|
};
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-04-07 22:11:39 -04:00
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
services = {
|
|
|
|
fprintd.enable = true;
|
|
|
|
fstrim.enable = true;
|
|
|
|
fwupd.enable = true;
|
2024-03-14 14:03:11 -04:00
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
udev.extraRules = ''
|
|
|
|
# Ethernet expansion card support
|
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
|
|
|
'';
|
|
|
|
};
|
2024-03-12 22:08:02 -04:00
|
|
|
}
|