{ config, pkgs, ... }:
let
  globals = import ../../config/globals.nix;
in {
  imports = [
    ./hardware-configuration.nix
    ../../modules/desktop/xorg-bspwm.nix
    ../../modules/common/nix.nix
    ../../modules/common/base.nix
    ../../modules/common/fonts.nix
    ../../modules/common/networking.nix
    ../../modules/common/plymouth.nix
    ../../modules/common/audio.nix
  ];

  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.initrd.luks.devices.cryptroot.device = "/dev/nvme0n1p3";

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

  console.keyMap = "fr";

  services.openssh.enable = true;
  services.openssh.settings = {
    PermitRootLogin = "no";
    PasswordAuthentication = true;
  };

  age.identityPaths = [ "/etc/agenix/penduick.key" ];
  age.secrets."dunoz-password-penduick".file = ../../secrets/dunoz-password-penduick.age;
  users= {
    mutableUsers = false ;
    users.dunoz = {
      isNormalUser = true;
      extraGroups = [ "wheel" "networkmanager" ];
      hashedPasswordFile = config.age.secrets."dunoz-password-penduick".path;
      shell = pkgs.zsh;
    };
  };

  home-manager = {
    useGlobalPkgs = true ;
    users.dunoz = import ../../hm/users/dunoz-desktop.nix ;
  };

  environment.systemPackages = with pkgs; [
    git htop wget curl
    neovim
    age ssh-to-age
  ];




# Optionnel mais utile pour SSH au démarrage
systemd.services.sshd.wantedBy = [ "multi-user.target" ];

  system.stateVersion = "25.05";
}
