nixos-config/modules/desktop/hyprland/default.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-17 16:50:50 +02:00
#
# Sway configuration
#
# flake.nix
# ├─ ./hosts
# │ └─ ./laptop
# │ └─ default.nix
# └─ ./modules
# └─ ./desktop
# └─ ./hyprland
# └─ hyprland.nix *
#
{ config, lib, user, pkgs, ... }:
2022-09-17 16:50:50 +02:00
{
imports = [ ../../programs/waybar.nix ];
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel
libvdpau-va-gl
libva-utils
];
};
2022-09-17 16:50:50 +02:00
environment = {
loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland
fi
''; # Will automatically open sway when logged into tty1
variables = {
#LIBCL_ALWAYS_SOFTWARE = "1"; # For applications in VM like alacritty to work
#WLR_NO_HARDWARE_CURSORS = "1"; # For cursor in VM
};
};
programs = {
hyprland.enable = true;
};
xdg.portal = { # Required for flatpak with windowmanagers
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}