feat(compositors)!: Add niri

According to its github page, niri is "A scrollable-tiling Wayland
compositor". Myself and coded have been looking for alternatives to
hyprland for stability and community reasons, and niri looks reasonable
for us

It's possible we'll remove hyprland altogether. If we do, we plan to
still maintain a more traditional compositor (e.g. swayfx)

BREAKING-CHANGE: This patch renames some hyprland options
Change-Id: I170dde769b55ebb32a3212a54012443fb4d0faf8
diff --git a/modules/nixos/compositors/default.nix b/modules/nixos/compositors/default.nix
new file mode 100644
index 0000000..3d4f109
--- /dev/null
+++ b/modules/nixos/compositors/default.nix
@@ -0,0 +1,28 @@
+{ pkgs, lib, config, ... }:
+{
+  options.chimera.compositors = {
+    hyprland.enable = lib.mkEnableOption "Enable if at least 1 user on the system uses hyprland";
+    niri.enable = lib.mkEnableOption "Enable if at least 1 user on the system uses niri";
+  };
+
+  config = {
+    fonts.enableDefaultPackages = lib.mkDefault true;
+    hardware.opengl.enable = lib.mkDefault true;
+
+    programs.hyprland.enable = config.chimera.compositors.hyprland.enable;
+
+    xdg.portal.enable = lib.mkIf config.chimera.compositors.niri.enable true;
+    xdg.portal.config.common.default = "*"; # HACK: fixme @minion3665, try removing this and check the warning
+
+    xdg.portal.extraPortals = lib.mkIf (
+      config.chimera.compositors.hyprland.enable
+      || config.chimera.compositors.niri.enable
+    ) [ pkgs.xdg-desktop-portal-gtk ];
+
+    programs.dconf.enable = true; # FIXME: should be set to true if gtk is being used
+
+    security.polkit.enable = true;
+
+    chimera.xdg-open.enable = lib.mkDefault true;
+  };
+}
diff --git a/modules/nixos/hyprland/default.nix b/modules/nixos/hyprland/default.nix
deleted file mode 100644
index 80a7733..0000000
--- a/modules/nixos/hyprland/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ pkgs, lib, ... }:
-{
-  programs.hyprland.enable = true;
-  xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
-  chimera.xdg-open.enable = lib.mkDefault true;
-}
diff --git a/modules/nixos/users/default.nix b/modules/nixos/users/default.nix
index 4f8b70d..6556aeb 100644
--- a/modules/nixos/users/default.nix
+++ b/modules/nixos/users/default.nix
@@ -37,5 +37,8 @@
     ];
   };
 
+   # TODO: can we determine these from what home-manager says our users are using?
+  security.pam.services.swaylock = { };
   security.pam.services.waylock = { };
+  security.pam.services.gtklock = { };
 }