nixos-config/system/wm/hyprland.nix

45 lines
1.1 KiB
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.swaylock = {
text = ''
auth include login
'';
};
# pam.services.gtklock = {};
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.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;
}