summaryrefslogtreecommitdiff
path: root/os/wm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/wm/default.nix')
-rw-r--r--os/wm/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/os/wm/default.nix b/os/wm/default.nix
new file mode 100644
index 0000000..a470171
--- /dev/null
+++ b/os/wm/default.nix
@@ -0,0 +1,37 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+let
+ cfg = config.os.wm;
+in
+{
+ imports = [ ./niri.nix ];
+
+ options.os.wm.enable = lib.mkEnableOption "enables shared wm features";
+
+ config = lib.mkIf cfg.enable {
+ services.dbus.enable = true;
+
+ xdg.portal = {
+ enable = true;
+ xdgOpenUsePortal = true;
+
+ extraPortals = [
+ pkgs.xdg-desktop-portal-gnome
+ pkgs.xdg-desktop-portal-gtk
+ ];
+
+ config = {
+ common.default = [ "gtk" ];
+ niri = {
+ "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ];
+ "org.freedesktop.impl.portal.Screenshot" = [ "gnome" ];
+ "default" = [ "gtk" ];
+ };
+ };
+ };
+ };
+}