{ config, pkgs, ... }:

{
  # Bootloader
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "nixos";
  networking.networkmanager.enable = true;

  time.timeZone = "Asia/Amman";
  i18n.defaultLocale = "en_US.UTF-8";

  hardware.cpu.intel.updateMicrocode = true;
  hardware.opengl = {
    enable = true;
    driSupport = true;
    driSupport32Bit = true;
  };
  services.xserver.videoDrivers = ["nvidia"];
  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = false;
    open = true; 
    nvidiaSettings = true;
    prime = {
      intelBusId = "PCI:0:2:0"; # Verify with `lspci | grep VGA`
      nvidiaBusId = "PCI:1:0:0"; # Verify with `lspci | grep VGA`
    };
  };

  # System Services
  services.printing.enable = true; 
  services.blueman.enable = true;
  hardware.bluetooth.enable = true;
  services.coolercontrol.enable = true;
  services.ollama.enable = true;
  virtualisation.libvirtd.enable = true;

  # Display Manager & Desktop
  services.displayManager.sddm = {
    enable = true;
    wayland.enable = true;
  };
  
  programs.hyprland.enable = true;
  programs.zsh.enable = true;

  # User Account
  users.users.nouredeen = {
    isNormalUser = true;
    description = "Nouredeen";
    extraGroups = [ "networkmanager" "wheel" "libvirtd" "video" "audio" ];
    shell = pkgs.zsh;
  };

  # DO NOT CHANGE
  system.stateVersion = "24.05"; 
}
