nix-conf/systems/oni/hardware.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2023-02-23 20:34:35 +01:00
{ config, lib, pkgs, modulesPath, inputs, ... }:
let
inherit (inputs) nixos-hardware;
in
{
imports = with nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
common-cpu-amd
2023-03-14 13:50:59 +01:00
common-gpu-amd
2023-02-23 20:34:35 +01:00
common-pc
2023-05-16 14:55:15 +02:00
common-pc-ssd
2023-02-23 20:34:35 +01:00
];
boot = {
kernelPackages = pkgs.linuxPackages_zen;
initrd = {
2023-05-16 14:55:15 +02:00
kernelModules = [ "amdgpu" ];
2023-02-23 20:34:35 +01:00
availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sr_mod" ];
};
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/c013c58e-540f-4547-b218-f7d34b07f7df";
fsType = "ext4";
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/F1C3-4668";
fsType = "vfat";
};
};
swapDevices = [ {
device = "/dev/disk/by-uuid/8a721407-d8bc-4d2d-970a-7ff462107dc3";
} ];
# @NOTE(jakehamilton): NetworkManager will handle DHCP.
networking.interfaces.enp2s0.useDHCP = false;
networking.interfaces.wlp3s0.useDHCP = false;
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}