infrastructure/machines/nixos/hypervisor03/_hardware-configuration.nix

82 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-12-17 16:32:22 +01:00
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"ehci_pci"
"ahci"
"mpt3sas"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "rootfs";
fsType = "zfs";
};
"/nix" = {
device = "rootfs/nix";
fsType = "zfs";
};
"/var" = {
device = "rootfs/var";
fsType = "zfs";
};
# boot1 = boot partition in first disk (used by default)
# boot2 = boot partition in second disk (used in backup)
"/boot1" = {
device = "/dev/disk/by-uuid/80E2-979C";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
# TODO: put me in automounts + autosync between both boot partitions.
"/boot2" = {
device = "/dev/disk/by-uuid/8722-1B4F";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/dfe3aa01-ed46-4996-8ae3-a913ebffba76"; }
{ device = "/dev/disk/by-uuid/5531258d-3538-4744-be1b-e08e26ad377f"; }
];
networking.useDHCP = lib.mkDefault true;
networking.interfaces.eno4.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}