summaryrefslogtreecommitdiff
path: root/sys/wm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/wm')
-rw-r--r--sys/wm/niri.nix17
-rw-r--r--sys/wm/wm.nix19
2 files changed, 22 insertions, 14 deletions
diff --git a/sys/wm/niri.nix b/sys/wm/niri.nix
index 96a08ca..c92b068 100644
--- a/sys/wm/niri.nix
+++ b/sys/wm/niri.nix
@@ -1,11 +1,11 @@
{ inputs, config, lib, pkgs, username, ... }:
let
- cfg = config.szpont.sys.wm.niri;
+ cfg = config.sys.wm.niri;
in
{
imports = [ inputs.niri.nixosModules.niri ];
- options.szpont.sys.wm.niri.enable = lib.mkEnableOption "Niri";
+ options.sys.wm.niri.enable = lib.mkEnableOption "Niri";
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
@@ -15,16 +15,7 @@ in
package = pkgs.niri-unstable;
};
- xdg.portal = {
- enable = true;
- extraPortals = [
- pkgs.xdg-desktop-portal-gtk
- ];
- };
-
- services.dbus.enable = true;
-
- szpont.sys.srv.compat.enable = true;
- home-manager.users.${username}.szpont.hm.env.niri.enable = true;
+ sys.srv.compat.enable = true;
+ home-manager.users.${username}.hm.env.niri.enable = true;
};
}
diff --git a/sys/wm/wm.nix b/sys/wm/wm.nix
index 48df857..10780e0 100644
--- a/sys/wm/wm.nix
+++ b/sys/wm/wm.nix
@@ -1,6 +1,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" ];
+ };
+ };
}