summaryrefslogtreecommitdiff
path: root/sys/wm/wm.nix
blob: 10780e0559a39804e107de09aa08d5c271eb7ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, pkgs, ... }:
let
  cfg = config.sys.wm;
in
{
  imports = [
    ./niri.nix
  ];

  options.sys.wm.enable = lib.mkEnableOption "enables shared wm features";

  config = lib.mkIf (cfg.enable || cfg.niri.enable or false) {
    services.dbus.enable = true;

    xdg.portal = {
      enable = true;
      wlr.enable = true;
      xdgOpenUsePortal = true;
      extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
      config.common.default = [ "gtk" ];
    };
  };
}