vm doesnt work with hyprland :(
This commit is contained in:
@@ -1,73 +1,72 @@
|
|||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
with lib;
|
|
||||||
let cfg = config.custom.graphical.hyprland;
|
let cfg = config.custom.graphical.hyprland;
|
||||||
in {
|
in {
|
||||||
options.custom.graphical.hyprland = {
|
options.custom.graphical.hyprland = {
|
||||||
enable = mkEnableOption "Enables hyprland";
|
enable = lib.mkEnableOption "Enables hyprland";
|
||||||
};
|
};
|
||||||
options.custom.graphical.hyprland.videobridge = {
|
options.custom.graphical.hyprland.videobridge = {
|
||||||
enable = mkEnableOption "Enables xwaylandvideobridge for hyprland";
|
enable = lib.mkEnableOption "Enables xwaylandvideobridge for hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
xkb.layout = config.mainUser.layout;
|
xkb.layout = config.mainUser.layout;
|
||||||
xkb.variant = config.mainUser.variant;
|
xkb.variant = config.mainUser.variant;
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager =
|
displayManager =
|
||||||
mkIf (!config.services.xserver.displayManager.sddm.enable) {
|
lib.mkIf (!config.services.xserver.displayManager.gdm.enable) {
|
||||||
gdm.enable = true;
|
sddm.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
WLR_NO_HARDWARE_CURSORS="1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
#WLR_DRM_NO_ATOMIC="1";
|
#WLR_DRM_NO_ATOMIC="1";
|
||||||
#WLR_DRM_DEVICES = "/dev/dri/card0";
|
#WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||||
LIBVA_DRIVER_NAME="nvidia";
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
# black screen :(
|
} // lib.mkIf config.custom.hardware.nvidia.enable {
|
||||||
#XDG_SESSION_TYPE = "wayland";
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
GBM_BACKEND = "nvidia-drm";
|
# black screen :(
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
#XDG_SESSION_TYPE = "wayland";
|
||||||
WLR_RENDERER_ALLOW_SOFTWARE="1";
|
GBM_BACKEND = "nvidia-drm";
|
||||||
};
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
#WLR_BACKENDS="x11,way
|
||||||
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
# Opengl
|
# Opengl
|
||||||
opengl.enable = true;
|
opengl.enable = true;
|
||||||
|
# Most wayland compositors need this
|
||||||
|
nvidia.modesetting.enable =
|
||||||
|
lib.mkIf config.custom.hardware.nvidia.enable true;
|
||||||
|
};
|
||||||
|
|
||||||
# Most wayland compositors need this
|
xdg.portal.enable = true;
|
||||||
nvidia.modesetting.enable = true;
|
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
programs.hyprland = { enable = true; };
|
||||||
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
|
|
||||||
|
|
||||||
programs.hyprland = {
|
security.pam.services.hyprlock = { };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pam.services.hyprlock = {};
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
# List packages installed in system profile. To search, run:
|
environment.systemPackages = with pkgs; [
|
||||||
# $ nix search wget
|
# hyprland stuff
|
||||||
environment.systemPackages = with pkgs; [
|
dunst
|
||||||
# hyprland stuff
|
swww
|
||||||
dunst
|
rofi-wayland
|
||||||
swww
|
libnotify
|
||||||
rofi-wayland
|
networkmanagerapplet
|
||||||
libnotify
|
wayland
|
||||||
networkmanagerapplet
|
wl-clipboard
|
||||||
wayland
|
#qt5.qtwayland
|
||||||
wl-clipboard
|
#qt6.qmake
|
||||||
#qt5.qtwayland
|
#qt6.qtwayland
|
||||||
#qt6.qmake
|
#waybar
|
||||||
#qt6.qtwayland
|
#xdg-desktop-portal-hyprland
|
||||||
#waybar
|
#xdg-desktop-portal-gtk
|
||||||
#xdg-desktop-portal-hyprland
|
#xdg-utils
|
||||||
#xdg-desktop-portal-gtk
|
#xwayland
|
||||||
#xdg-utils
|
];
|
||||||
#xwayland
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
};
|
};
|
||||||
graphical = {
|
graphical = {
|
||||||
#i3.enable = true;
|
#i3.enable = true;
|
||||||
plasma.enable = true;
|
hyprland.enable = true;
|
||||||
#lightdm.enable = true;
|
#lightdm.enable = true;
|
||||||
#sddm.enable = true;
|
#sddm.enable = true;
|
||||||
#cosmic.enable = true;
|
#cosmic.enable = true;
|
||||||
@@ -26,7 +26,13 @@
|
|||||||
};
|
};
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
virtualisation.qemu.options = [ "-vga qxl" ];
|
#virtualisation.qemu.options = [
|
||||||
|
# "-device virtio-vga-gl"
|
||||||
|
# "-display sdl,gl=on,show-cursor=off"
|
||||||
|
# "-audio pa,model=hda"
|
||||||
|
# #"-full-screen"
|
||||||
|
# ];
|
||||||
|
#virtualisation.qemu.options = [ "-vga qxl" ];
|
||||||
#[ "-vga none" "-device virtio-gpu-gl-pci" "-display default,gl=on" ];
|
#[ "-vga none" "-device virtio-gpu-gl-pci" "-display default,gl=on" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user