nixos/miku/hardware-configuration.nix
2025-05-05 16:26:11 +02:00

31 lines
946 B
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
# basic drivers
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
# AMD CPU
boot.kernelModules = [ "kvm-amd" ];
hardware.cpu.amd.updateMicrocode = true;
# AMD graphics
boot.initrd.kernelModules = [ "amdgpu" ];
services.ollama.acceleration = "rocm";
# /boot efi partition to boot in UEFI mode
fileSystems."/boot" = {
device = "/dev/disk/by-id/nvme-KINGSTON_SFYRD4000G_50026B7686EC5F33-part1";
fsType = "vfat";
neededForBoot = true;
options = [ "fmask=0022" "dmask=0022" ];
};
# /nix volume with the system & all persistent data
fileSystems."/nix" = {
device = "/dev/disk/by-id/nvme-KINGSTON_SFYRD4000G_50026B7686EC5F33-part2:/dev/disk/by-id/nvme-KINGSTON_SFYRD4000G_50026B7686EC6164-part2";
fsType = "bcachefs";
neededForBoot = true;
};
}