2024-03-09 01:15:42 +03:00
|
|
|
{ ... }: {
|
2024-03-04 00:34:39 +03:00
|
|
|
# Enable non-free firmware.
|
2024-03-09 01:15:42 +03:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
2024-03-04 00:34:39 +03:00
|
|
|
|
|
|
|
# Configure bootloader.
|
2024-04-14 22:58:11 +03:00
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
2024-04-05 21:13:10 +03:00
|
|
|
|
2024-05-04 23:15:57 +03:00
|
|
|
# Use systemd to boot.
|
2024-04-14 22:58:11 +03:00
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
2024-05-04 23:15:57 +03:00
|
|
|
|
|
|
|
# Limit the amound of generations availabe for rollback.
|
|
|
|
# This helps to save storage space.
|
2024-04-17 13:25:07 +03:00
|
|
|
configurationLimit = 10;
|
2024-04-14 22:58:11 +03:00
|
|
|
};
|
|
|
|
};
|
2024-05-04 23:15:57 +03:00
|
|
|
|
|
|
|
# Mount /tmp on tmpfs.
|
2024-04-14 22:58:11 +03:00
|
|
|
tmp.useTmpfs = true;
|
2024-05-04 23:15:57 +03:00
|
|
|
|
2024-04-14 22:58:11 +03:00
|
|
|
initrd = {
|
2024-05-04 23:15:57 +03:00
|
|
|
# Don't really know if I need it. Kept from hardware-configuration.
|
|
|
|
kernelModules = [ "dm-snapshot" ];
|
2024-04-14 22:58:11 +03:00
|
|
|
|
2024-05-04 23:15:57 +03:00
|
|
|
# Kernel modules available for all the hosts.
|
2024-04-14 22:58:11 +03:00
|
|
|
availableKernelModules = [
|
|
|
|
"ahci"
|
|
|
|
"ata_piix"
|
|
|
|
"mptspi"
|
|
|
|
"nvme"
|
|
|
|
"sd_mod"
|
|
|
|
"sr_mod"
|
|
|
|
"usb_storage"
|
|
|
|
"usbhid"
|
|
|
|
"xhci_pci"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|