dotfiles.nix/nixos/fuchsia/hardware-configuration.nix

40 lines
793 B
Nix
Raw Normal View History

2023-04-03 22:41:22 +08:00
{
2024-08-08 09:02:42 +08:00
config,
lib,
...
}: {
2024-01-14 06:29:18 +08:00
imports = [
../common/optional/ephemeral-btrfs.nix
];
boot = {
initrd = {
2024-08-08 09:02:42 +08:00
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
kernelModules = ["kvm-amd"];
2023-04-06 09:33:49 +08:00
};
2024-01-21 21:03:57 +08:00
loader = {
2024-01-14 06:29:18 +08:00
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
2023-04-06 09:33:49 +08:00
};
2024-01-14 06:29:18 +08:00
};
2023-04-06 09:33:49 +08:00
2024-01-14 06:29:18 +08:00
fileSystems."/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
2023-04-06 09:33:49 +08:00
2024-01-14 06:29:18 +08:00
swapDevices = [
2024-08-08 09:02:42 +08:00
{
device = "/swap/swapfile";
size = 16 * 1024;
2024-01-14 06:29:18 +08:00
}
];
2023-04-06 09:33:49 +08:00
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2023-04-03 22:41:22 +08:00
}