{ pkgs, inputs, ... }:

{
  # Import wayland config
  imports = [ ./wayland.nix
              ./pipewire.nix
              ./dbus.nix
            ];

  # Security
  security = {
    pam.services.swaylock = {
      text = ''
        auth include login
      '';
    };
#    pam.services.gtklock = {};
    pam.services.login.enableGnomeKeyring = true;
  };

  services.gnome.gnome-keyring.enable = true;

  programs = {
    hyprland = {
      enable = true;
      xwayland = {
        enable = true; 
#   package = inputs.hyprland.packages.${pkgs.system}.hyprland.override {
#      wlroots = inputs.hyprland.packages.${pkgs.system}.wlroots-hyprland.overrideAttrs (self: super: {
#        patches =
#          (super.patches or [])
#          ++ [
#            (pkgs.fetchpatch {
#              url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4596.patch";
#              hash = "sha256-apLXjGfGHgY5gY2/9WG66ngMPoshiSI0uSkZ3Gisdzo=";
#            })
#          ];
#      });
#    };
   };
  };
      portalPackage = pkgs.xdg-desktop-portal-hyprland;
  };
}
