# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).

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

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      ../modules/home-manager.nix
      ../modules/common.nix
      ../modules/users.nix
      ../modules/locales.nix
      ../modules/services.nix
      ../modules/programs.nix
      ../modules/docker.nix
      ../modules/printing.nix
      ../modules/bambu-studio-flatpak.nix
      ../modules/arduino-ide.nix
      ../modules/devenv.nix
#      ../modules/bitwarden.nix
    ];

  boot.kernelPackages = pkgs.linuxPackages_latest;

  boot.loader.systemd-boot.enable = false;
  boot.loader = {
    efi = {
      canTouchEfiVariables = true;
      efiSysMountPoint = "/boot/efi"; # ← use the same mount point here.
    };
    grub = {
       efiSupport = true;
       device = "nodev";
    };
  };

  networking.hostName = "balrog";
  networking.networkmanager.enable = true;
  networking.nameservers = [ "192.168.68.56" "1.1.1.1" "8.8.8.8" ];

  hardware.enableAllFirmware = true;

  boot.initrd.kernelModules = [ "wl" ]; boot.kernelModules = [ "wl" "kvm-intel" ];

  boot.extraModulePackages = with config.boot.kernelPackages; [
    broadcom_sta
  ];

  nixpkgs.config = {
    allowInsecurePredicate = pkg: builtins.elem (lib.getName pkg) ["broadcom-sta"]; 
  };
  hardware.bluetooth.enable = true;
  services.blueman.enable = true;
  system.stateVersion = "25.11"; # Did you read the comment?
}
