{ config, pkgs, ... }:

let
  hostname = "zbox";

in {

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  imports = [
    ../defaults.nix
    ../hardware-configuration.nix
  ];

  environment.systemPackages = with pkgs; [
    androidenv.androidPkgs_9_0.platform-tools
    android-studio
    dnsproxy
    glxinfo
    hll2380dw-cups
    nodejs
    signal-desktop
    thunderbird
    usbutils
  ];

  fudo.common = {
    profile = "desktop";
    site = "seattle";
    enable-gui = true;
  };

  fudo.slynk = {
    enable = true;
  };

  hardware.cpu.intel.updateMicrocode = true;

  programs = {
    adb.enable = true;
    bash.enableCompletion = true;
  };

  services.xserver = {
    videoDrivers = ["nvidia"];
    # displayManager.gdm.wayland = false;
  };

  hardware.opengl.driSupport32Bit = true;
  hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
  hardware.opengl.driSupport = true;

  hardware.pulseaudio.support32Bit = true;

  networking = {
    hostName = hostname;

    macvlans = {
      intif0 = {
        interface = "eno1";
        mode = "bridge";
      };
    };

    interfaces = {
      eno1.useDHCP = false;
      intif0 = {
        macAddress = "02:dd:80:52:83:9b";
        useDHCP = false;
        ipv4.addresses = [
          {
            address = "10.0.0.110";
            prefixLength = 24;
          }
        ];
      };
    };
  };

  hardware.bluetooth.enable = true;

  users.users.niten = {
    extraGroups = ["adbusers"];
  };

  virtualisation.lxd.enable = true;

}