Files
nixos/Droidnix/generated/parked/desktop/wayland.nix
T
2026-03-21 19:47:47 +00:00

49 lines
1008 B
Nix

{ lib, config, ... }:
let
# --- Module variables ---
moduleName = "wayland";
username = config.defaultUser or "henrov";
# Top-level toggle
enableProgram = config.enableWayland or false;
in
{
# --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland support";
# --- Config ---
config = lib.mkIf enableProgram {
# Enable Hyprland in Wayland
wayland.windowManager.hyprland = {
enable = true;
# Enable XDG portals (required for Wayland apps)
xdg.portal.enable = true;
# Home Manager configuration
home-manager.users.${username} = {
xdg.portal = {
enable = true;
# Only unavoidable pkgs reference
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
# Wayland-related user package
home.packages = [
config.pkgs.uwsm
];
};
};
}