aboutsummaryrefslogtreecommitdiff
path: root/modules/nixos/des/niri.nix
blob: 0a1578bfc7a850c1d7ff86745c60010cde88b8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, lib, pkgs, ... }:

{
  # Disable X11 for Wayland-only setup
  services.xserver.enable = false;
  
  # Enable Niri
  programs.niri = {
    enable = true;
  };

  # XDG portal for Wayland
  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-gnome ];
  };

  # Required Wayland packages
  environment.systemPackages = with pkgs; [
    qt6.qtwayland
    qt6.qttools
  ];

  # Provide keyboard layout vars for Wayland environments and fallback
  environment.variables = {
    XKB_DEFAULT_LAYOUT = "cz";
    XKB_DEFAULT_OPTIONS = "eurosign:e,caps:escape";
  };

  # Make Electron apps work on Wayland
  environment.sessionVariables.NIXOS_OZONE_WL = "1";
}