# 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.supportedFilesystems = [ "bcachefs" ];
  boot.initrd.availableKernelModules = [
    "ehci_pci"
    "ahci"
    "xhci_pci"
    "firewire_ohci"
    "usbhid"
    "usb_storage"
    "sd_mod"
  ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/e8d53d2d-bb73-41d7-bc64-93af7d3a5e7b";
    fsType = "ext4";
  };

  swapDevices = [
    { device = "/dev/disk/by-uuid/f043c171-5d20-4c6c-bc82-6e72139d7cb1"; }
  ];

  fileSystems."/data" = {
    device =
      # root@h002:/home/luser/ > bcachefs format --compression=zstd --replicas=2 /dev/sda /dev/sdb /dev/sdc /dev/sde /dev/sdf
      # External UUID:                             53a26b95-941b-4f41-b049-c166905ed8c2
      # Internal UUID:                             9d63b280-7b25-46a7-8437-4c6d92e63790
      # Magic number:                              c68573f6-66ce-90a9-d96a-60cf803df7ef
      "UUID=53a26b95-941b-4f41-b049-c166905ed8c2";
    fsType = "bcachefs";
    options = [
      "defaults"
      # "fsck"
      # "fix_errors"
      "x-systemd.device-timeout=600s"
      "nofail"
    ];
  };

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.eno1.useDHCP = lib.mkDefault true;

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
