nix-dotfiles/hosts/flubber-machine/hardware.nix
2026-04-30 17:18:05 -07:00

61 lines
2.1 KiB
Nix
Executable file

{ inputs, config, lib, pkgs, modulesPath, ... }:
{
imports =
[
inputs.hardware.nixosModules.common-cpu-amd
inputs.hardware.nixosModules.common-cpu-amd-zenpower
inputs.hardware.nixosModules.common-gpu-amd
inputs.hardware.nixosModules.common-pc-ssd
inputs.hardware.nixosModules.common-pc
inputs.hardware.nixosModules.msi-b550-a-pro # pro b550m-vc, not b550-a pro, but they use mostly the same chips
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "zenergy" ];
boot.extraModulePackages = with config.boot.kernelPackages; [ zenergy ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
modules.hardware = {
graphics.amdgpu.enable = true;
graphics.amdgpu.overclock = true;
audio.enable = true;
bluetooth.enable = true;
networking.enable = true;
print.enable = true;
pointer.enable = true;
rgb.enable = true;
tablet.enable = true;
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5da6bab0-856a-4e65-8ff6-5b70fe3764b8";
fsType = "btrfs";
options = [ "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AA0D-269D";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d937e754-ba63-4fc0-be78-60f456392373"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.end0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}