{ config, lib, user, host, pkgs, modulesPath, ... }:
{
  imports = [
    (modulesPath + "/installer/scan/not-detected.nix")
  ];

  environment.systemPackages = with pkgs; [
    ntfs3g
  ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
  # boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems = if host != "NxACE" then {
    "/" =                    { device = "/dev/disk/by-label/nixos";    fsType = "ext4"; };
    "/boot" =                { device = "/dev/disk/by-label/EFI";      fsType = "vfat"; };
    "/home/${user}/shared" = { device = "/dev/disk/by-label/shared";   fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
  } else { 
    "/" =                    { device = "/dev/disk/by-label/nixos";    fsType = "ext4"; };
    "/boot" =                { device = "/dev/disk/by-label/EFI";      fsType = "vfat"; };
    "/vault" =               { device = "/dev/disk/by-label/vault";    fsType = "ext4"; };

};


  swapDevices = [
    { device = "/dev/disk/by-label/swap"; }
  ];

  networking.useDHCP = lib.mkDefault true;

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

  # from nixos-hardware
  services.thermald.enable = lib.mkDefault true;
  boot.extraModprobeConfig = if host == "NxXPS" then ''
    options iwlwifi 11n_disable=8
  '' else "";
  boot.initrd.kernelModules = if host == "NxXPS" then [ "i915" ] else [];

  environment.variables = if host == "NxXPS" then {
    VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
  } else {};

  hardware.graphics.extraPackages = if host == "NxXPS" then with pkgs; [
    (if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") then vaapiIntel else intel-vaapi-driver)
    libvdpau-va-gl
    intel-media-driver
  ] else [];
}
