2024-01-14 06:29:18 +08:00
|
|
|
{ config, lib, ... }:
|
2023-04-06 09:33:49 +08:00
|
|
|
|
2023-04-03 22:41:22 +08:00
|
|
|
{
|
2024-01-14 06:29:18 +08:00
|
|
|
imports = [
|
|
|
|
../common/optional/ephemeral-btrfs.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
initrd = {
|
|
|
|
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 = [
|
|
|
|
{ device = "/swap/swapfile";
|
|
|
|
size = 16*1024;
|
|
|
|
}
|
|
|
|
];
|
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
|
|
|
}
|