From a0153e60d5b74c277f854588125081ba7a153e44 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sun, 1 Oct 2023 11:10:28 +0200 Subject: [PATCH] experiment(sway-desktop): enable xwayland and reorg overrides --- nix/home-manager/profiles/sway-desktop.nix | 21 ++++++++++++++++++++- nix/os/devices/steveej-t14/default.nix | 2 -- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/nix/home-manager/profiles/sway-desktop.nix b/nix/home-manager/profiles/sway-desktop.nix index 9640e4a..9b88af6 100644 --- a/nix/home-manager/profiles/sway-desktop.nix +++ b/nix/home-manager/profiles/sway-desktop.nix @@ -3,6 +3,7 @@ config, lib, packages', + repoFlakeInputs', ... }: let inherit (import ../lib.nix {}) mkSimpleTrayService; @@ -33,6 +34,24 @@ in { services.gpg-agent.pinentryFlavor = "gnome3"; + nixpkgs.overlays = [ + (final: prev: { + xdg-desktop-portal-wlr' = repoFlakeInputs'.nixpkgs-wayland.packages.xdg-desktop-portal-wlr; + xdg-desktop-portal-wlr-gtk' = repoFlakeInputs'.nixpkgs-wayland.packages.xdg-desktop-portal-wlr-gtk; + sway-unwrapped = let + fixed_wlroots = prev.wlroots_0_16.overrideAttrs (old: { + patches = [ + (builtins.fetchurl { + sha256 = "05h9xzicz3fccskg2hbqnw2qh4bm7mwi70c4m00y87w5yhj9gxps"; + url = "https://gist.githubusercontent.com/steveej/1d8c96ed2fdb3d9ddd0344ca5136073f/raw/d6a097a452b950865b554587db606e718d99c572/fix-wlroots.patch"; + }) + ]; + }); + in + prev.sway-unwrapped.override {wlroots_0_16 = fixed_wlroots;}; + }) + ]; + home.packages = [ pkgs.swayidle pkgs.swaylock @@ -79,7 +98,7 @@ in { enable = true; systemdIntegration = true; # systemd.enable = true; - xwayland = false; + xwayland = true; config = let modifier = "Mod4"; diff --git a/nix/os/devices/steveej-t14/default.nix b/nix/os/devices/steveej-t14/default.nix index 739065b..15b7745 100644 --- a/nix/os/devices/steveej-t14/default.nix +++ b/nix/os/devices/steveej-t14/default.nix @@ -17,8 +17,6 @@ in { overlays = [ (final: prev: { # FIXME: why are these not effective in for the configuration.nix below? - xdg-desktop-portal-wlr' = repoFlake.inputs.nixpkgs-wayland.packages.${system}.xdg-desktop-portal-wlr; - xdg-desktop-portal-wlr-gtk' = repoFlake.inputs.nixpkgs-wayland.packages.${system}.xdg-desktop-portal-wlr-gtk; }) ]; };