nixos-config/system/wm/hyprland.nix
2024-05-31 21:06:50 -05:00

39 lines
972 B
Nix

{ inputs, pkgs, lib, ... }: let
pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
# Import wayland config
imports = [ ./wayland.nix
./pipewire.nix
./dbus.nix
];
# Security
security = {
pam.services.login.enableGnomeKeyring = true;
};
services.gnome.gnome-keyring.enable = true;
programs = {
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland = {
enable = true;
};
portalPackage = pkgs-hyprland.xdg-desktop-portal-hyprland;
};
};
# fixes opengl/mesa version mismatch
hardware.opengl = {
package = pkgs-hyprland.mesa.drivers;
# if you also want 32-bit support (e.g for Steam)
driSupport32Bit = true;
package32 = pkgs-hyprland.pkgsi686Linux.mesa.drivers;
};
services.xserver.displayManager.sddm.package = lib.mkForce pkgs-hyprland.sddm;
}