{ lib, config, pkgs, ... }: {

  # Set the networking hostname:
  networking.hostName = "nixos-laptop";

  # Enable swap on luks
  boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".device = "/dev/disk/by-uuid/9704447e-6bd0-4a35-9c24-20cbab81c431";
  boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".keyFile = "/crypto_keyfile.bin";

  # Setup keyfile
  boot.initrd.secrets = {
    "/crypto_keyfile.bin" = null;
  };

  # Hibernation resume device:
  boot.resumeDevice = "/dev/disk/by-uuid/67600fc1-6d26-4d2f-b2d3-a99174654058";

  # Configure the fingerprint reader
  services.fprintd = { 
    enable = true;
    tod.enable = true;
    tod.driver = pkgs.libfprint-2-tod1-vfs0090;
  };

  # Enable nVidia PRIME Render Offload
  # https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/p1/3th-gen/nvidia.nix
  hardware.nvidia.prime = {
    # Bus ID of the Intel GPU.
    intelBusId = lib.mkDefault "PCI:0:2:0";
    # Bus ID of the NVIDIA GPU.
    nvidiaBusId = lib.mkDefault "PCI:1:0:0";
  };

  # Fingerprint software
  environment.systemPackages = with pkgs; [ fprintd ];
}