diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/profiles/gui/default.nix | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix index 2fbb505..56b9b04 100644 --- a/home/profiles/gui/default.nix +++ b/home/profiles/gui/default.nix @@ -1,4 +1,4 @@ -{ config, lib, inputs, pkgs, self, ... }: +{ config, options, lib, inputs, pkgs, self, ... }: let cfg = config.profiles.gui; @@ -103,6 +103,17 @@ in wayland.windowManager.sway = { enable = true; + package = + if cfg.laptop.enable then + options.wayland.windowManager.sway.package.default.override + (prev: { + sway-unwrapped = prev.sway-unwrapped.override (s-prev: { + wlroots = s-prev.wlroots.overrideAttrs { + patches = [ ../../../overlays/patches/wlroots-displaylink/DisplayLink_v2.patch ]; + }; + }); + }) else options.wayland.windowManager.sway.package.default; + wrapperFeatures = { base = true; gtk = true; @@ -201,8 +212,8 @@ in [{ # 10m (desktop only) timeout = 600; - command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; - resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; + command = "${config.wayland.windowManager.sway.package}/bin/swaymsg 'output * dpms off'"; + resumeCommand = "${config.wayland.windowManager.sway.package}/bin/swaymsg 'output * dpms on'"; }] ++ [ { # 10m on laptops, 15m on desktop |