blob: c323add446b1592ccce49f01ebcf9ff014908005 [file] [log] [blame]
Skyler Grey69a999e2024-05-23 00:09:10 +00001{ pkgs, lib, config, ... }:
2{
3 options.chimera.compositors = {
4 hyprland.enable = lib.mkEnableOption "Enable if at least 1 user on the system uses hyprland";
5 niri.enable = lib.mkEnableOption "Enable if at least 1 user on the system uses niri";
6 };
7
8 config = {
9 fonts.enableDefaultPackages = lib.mkDefault true;
Samuel Shuert70698fd2024-08-23 10:59:43 -040010 hardware.graphics.enable = lib.mkDefault true;
Skyler Grey69a999e2024-05-23 00:09:10 +000011
12 programs.hyprland.enable = config.chimera.compositors.hyprland.enable;
13
14 xdg.portal.enable = lib.mkIf config.chimera.compositors.niri.enable true;
15 xdg.portal.config.common.default = "*"; # HACK: fixme @minion3665, try removing this and check the warning
16
17 xdg.portal.extraPortals = lib.mkIf (
18 config.chimera.compositors.hyprland.enable
19 || config.chimera.compositors.niri.enable
20 ) [ pkgs.xdg-desktop-portal-gtk ];
21
22 programs.dconf.enable = true; # FIXME: should be set to true if gtk is being used
23
24 security.polkit.enable = true;
25
26 chimera.xdg-open.enable = lib.mkDefault true;
27 };
28}