# 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"
        "sd_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-label/BOOT1";
      fsType = "vfat";
      options = [
        "fmask=0022"
        "dmask=0022"
      ];
    };

    "/boot2" = {
      device = "/dev/disk/by-label/BOOT2";
      fsType = "vfat";
      options = [
        "fmask=0022"
        "dmask=0022"
      ];
    };
  };

  swapDevices = [
    { device = "/dev/disk/by-uuid/759f1573-7593-400e-b310-c384fc6124c3"; }
    { device = "/dev/disk/by-uuid/73f94cd3-3f0f-4a32-9e5b-abd6c2a9b219"; }
  ];

  networking.useDHCP = lib.mkDefault true;
  networking.interfaces.eno4.useDHCP = lib.mkDefault true;

  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}