Skyler Grey | 69a999e | 2024-05-23 00:09:10 +0000 | [diff] [blame] | 1 | { 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 Shuert | 70698fd | 2024-08-23 10:59:43 -0400 | [diff] [blame] | 10 | hardware.graphics.enable = lib.mkDefault true; |
Skyler Grey | 69a999e | 2024-05-23 00:09:10 +0000 | [diff] [blame] | 11 | |
| 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 | } |