From 45473cde4af137bee019998b8f5e739a62c8bbd0 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Wed, 14 Aug 2024 16:41:44 +0200 Subject: [PATCH] nixos-mods/improvedDefaults: add wayland --- .../improvedDefaults/default.nix | 1 + .../improvedDefaults/wayland.nix | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 nix/nixos-modules/improvedDefaults/wayland.nix diff --git a/nix/nixos-modules/improvedDefaults/default.nix b/nix/nixos-modules/improvedDefaults/default.nix index 4822120..bb81c16 100644 --- a/nix/nixos-modules/improvedDefaults/default.nix +++ b/nix/nixos-modules/improvedDefaults/default.nix @@ -12,6 +12,7 @@ in imports = [ ./command-not-found.nix ./powertop-tlp.nix + ./wayland.nix ]; diff --git a/nix/nixos-modules/improvedDefaults/wayland.nix b/nix/nixos-modules/improvedDefaults/wayland.nix new file mode 100644 index 0000000..661ae20 --- /dev/null +++ b/nix/nixos-modules/improvedDefaults/wayland.nix @@ -0,0 +1,37 @@ +{ config +, lib +, pkgs +, ... +}: +let + cfg = config.x-banananetwork.improvedDefaults; +in +{ + + + config = lib.mkIf cfg.enable ( + let + prgs = config.programs; + servDM = config.services.desktopManager; + xDM = config.services.xserver.desktopManager; + waylandEnabled = builtins.any (x: x) ([ + prgs.hyprland.enable + prgs.miriway.enable + prgs.river.enable + prgs.sway.enable + prgs.wayfire.enable + (xDM.mate.enable && xDM.mate.enableWaylandSession) + servDM.lomiri.enable # unsure wheather this is using Wayland + servDM.plasma6.enable + ]); + in + { + + # make Steam Input events on Wayland possible + programs.steam.extest.enable = lib.mkIf (config.programs.steam.enable && waylandEnabled) true; + + } + ); + + +}