67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}: {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
];
|
|
|
|
boot = {
|
|
loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
|
|
initrd = {
|
|
availableKernelModules = ["nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod"];
|
|
kernelModules = [];
|
|
};
|
|
|
|
kernelModules = ["kvm-amd" "amdgpu"];
|
|
extraModulePackages = [];
|
|
};
|
|
|
|
services.xserver.videoDrivers = ["amdgpu"];
|
|
|
|
networking = {
|
|
useDHCP = lib.mkDefault true;
|
|
interfaces = {
|
|
enp5s0f4u1u1c2 = {
|
|
useDHCP = false;
|
|
ipv4.addresses = [
|
|
{
|
|
address = "192.168.0.21";
|
|
prefixLength = 24;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
defaultGateway = {
|
|
address = "192.168.0.5";
|
|
interface = "enp5s0f4u1u1c2";
|
|
};
|
|
};
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
hardware = {
|
|
opengl = {
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
extraPackages = with pkgs; [
|
|
rocm-opencl-icd
|
|
rocm-opencl-runtime
|
|
];
|
|
};
|
|
|
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
|
|
];
|
|
}
|