{
  pkgs,
  lib,
  hostName,
  ...
}:
{
  imports = [
    ../../nixos/profiles/hardware/apu6b4.nix
    ../../nixos/profiles/hardware/ME909u-521.nix
    ../../nixos/profiles/serial.nix
    ../../nixos/profiles/zfs.nix
    ../../nixos/profiles/zramSwap.nix
    ../../nixos/profiles/pipewire.nix
  ];

  # Setting the machine-id avoids to reencrypt all credentials
  # when reinstalling NixOS on a new drive.
  # Manually generated with : uuidgen | tr -d -
  environment.etc.machine-id.source = ./machine-id.clear;

  # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
  # You should try to make this id unique among your hosts.
  # Manually generated with : uuidgen | head -c8
  networking.hostId = "408a404a";

  /*
    boot.loader.efi = {
    canTouchEfiVariables = true;
    efiSysMountPoint = "/boot/efi";
    };
  */
  boot.loader.grub = {
    enable = true;
    devices = [
      #"/dev/disk/by-id/mmc-SU08G_0xb0320f0f"
      #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
      "/dev/disk/by-id/ata-YMTC_JGS_2201060101833"
    ];
    configurationLimit = 9;

    #zfsSupport = true;
    #efiSupport = true;
    #enableCryptodisk = true;
  };

  boot.supportedFilesystems = [
    # "ntfs"
    "vfat"
  ];
  boot.extraModulePackages = [
    #config.boot.kernelPackages.exfat-nofuse
  ];
  boot.zfs.requestEncryptionCredentials = [ hostName ];

  hardware.enableRedistributableFirmware = true;

  powerManagement.powertop.enable = true;

  #services.fprintd.enable = true;

  fileSystems."/" = {
    device = "${hostName}/root";
    fsType = "zfs";
  };
  fileSystems."/boot" = {
    device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
    fsType = "ext4";
  };
  fileSystems."/boot/efi" = {
    device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
    fsType = "vfat";
  };
  fileSystems."/nix" = {
    device = "${hostName}/nix";
    fsType = "zfs";
  };
  fileSystems."/var" = {
    device = "${hostName}/var";
    fsType = "zfs";
  };
  fileSystems."/home" = {
    device = "${hostName}/home";
    fsType = "zfs";
  };
  swapDevices = [
    {
      device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
      randomEncryption = {
        enable = true;
        cipher = "aes-xts-plain64";
        source = "/dev/urandom";
      };
    }
  ];

}