2024-03-12 22:08:02 -04:00
|
|
|
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
|
|
|
|
{
|
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,
|
|
|
|
|
modulesPath,
|
2024-06-14 21:18:00 -04:00
|
|
|
|
pkgs,
|
2024-04-07 22:16:33 -04:00
|
|
|
|
...
|
|
|
|
|
}: {
|
2024-05-24 09:37:37 -04:00
|
|
|
|
imports = [
|
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
|
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
|
|
|
|
];
|
2024-04-07 22:16:33 -04:00
|
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
|
boot = {
|
|
|
|
|
initrd = {
|
|
|
|
|
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
|
2024-06-16 01:11:34 -04:00
|
|
|
|
kernelModules = ["amdgpu"];
|
2024-06-14 21:18:00 -04:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extraModulePackages = [];
|
2024-06-16 01:11:34 -04:00
|
|
|
|
kernelModules = ["kvm-amd" "amdgpu"];
|
2024-06-14 21:18:00 -04:00
|
|
|
|
kernelParams = ["amdgpu.abmlevel=0"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
|
|
enableAllFirmware = true;
|
2024-03-14 14:03:11 -04:00
|
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
|
opengl = {
|
|
|
|
|
## radv: an open-source Vulkan driver from freedesktop
|
|
|
|
|
driSupport = true;
|
|
|
|
|
driSupport32Bit = true;
|
2024-04-07 22:11:39 -04:00
|
|
|
|
|
2024-06-14 21:18:00 -04:00
|
|
|
|
## amdvlk: an open-source Vulkan driver from AMD
|
|
|
|
|
extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk];
|
|
|
|
|
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
|
|
|
|
|
};
|
2024-04-07 22:11:39 -04:00
|
|
|
|
};
|
|
|
|
|
|
2024-06-03 14:15:19 -04:00
|
|
|
|
services.xserver.videoDrivers = ["amdgpu"];
|
2024-04-07 22:11:39 -04:00
|
|
|
|
|
2024-03-14 14:03:11 -04:00
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-03-12 22:08:02 -04:00
|
|
|
|
}
|